summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2020-05-31 16:38:43 +0100
committerNadrieril2020-05-31 16:38:43 +0100
commit1d40832097eb9095bb0dea2e1c1524bb42a8f48c (patch)
tree0234f8b7ae882ca54a12aee4c582a98a110a1a86
parentda9480ad558f68d764ad61934d4385c055eda8d9 (diff)
nix: add dhall to environment
-rw-r--r--nix/sources.json7
-rw-r--r--shell.nix12
2 files changed, 18 insertions, 1 deletions
diff --git a/nix/sources.json b/nix/sources.json
index 8e183ea..fbf61db 100644
--- a/nix/sources.json
+++ b/nix/sources.json
@@ -1,4 +1,11 @@
{
+ "dhall": {
+ "sha256": "0jv2s3rjk4ha5vq0z4x5w9q3x01kxvwdadcj1a9x1qyx29xxi9qp",
+ "type": "tarball",
+ "url": "https://github.com/dhall-lang/dhall-haskell/releases/download/1.32.0/dhall-1.32.0-x86_64-linux.tar.bz2",
+ "url_template": "https://github.com/dhall-lang/dhall-haskell/releases/download/<version>/dhall-<version>-x86_64-linux.tar.bz2",
+ "version": "1.32.0"
+ },
"nixpkgs": {
"branch": "nixos-20.03",
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
diff --git a/shell.nix b/shell.nix
index bcb9f47..fd71b9b 100644
--- a/shell.nix
+++ b/shell.nix
@@ -1,10 +1,20 @@
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs {};
+
+ dhall = pkgs.stdenv.mkDerivation rec {
+ name = "dhall-${version}";
+ version = sources.dhall.version;
+ src = sources.dhall;
+ installPhase = ''
+ mkdir -p $out/bin
+ cp $src/* $out/bin/
+ '';
+ };
in
pkgs.mkShell {
buildInputs = with pkgs; [
binutils cmake gcc gnumake openssl pkgconfig rustup
- niv
+ niv dhall
];
}