From 8c2aafed45b4075e37f1cd93de0ebf93f38c83c3 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Fri, 24 Jan 2020 17:19:01 +0100 Subject: [PATCH] Remove dhall-haskell dependency --- flake.lock | 19 ------------------- flake.nix | 29 ++++++++++++----------------- 2 files changed, 12 insertions(+), 36 deletions(-) diff --git a/flake.lock b/flake.lock index 56c425a..f1258ea 100644 --- a/flake.lock +++ b/flake.lock @@ -1,24 +1,5 @@ { "inputs": { - "dhall-haskell": { - "inputs": { - "nixpkgs": { - "inputs": {}, - "narHash": "sha256-wJg4DA700SoQbEz61448sR6BgxRa1R92K3vvCV1g+HY=", - "originalUrl": "git+https://github.com/nixos/nixpkgs.git?ref=18.09-beta&rev=1d4de0d552ae9aa66a5b8dee5fb0650a4372d148", - "url": "git+https://github.com/nixos/nixpkgs.git?ref=18.09-beta&rev=1d4de0d552ae9aa66a5b8dee5fb0650a4372d148" - }, - "nixpkgsStaticLinux": { - "inputs": {}, - "narHash": "sha256-famU3pJZ4vkElV9qc71HmyRVSvcrAhfMZ0UJKpmmKP8=", - "originalUrl": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working", - "url": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working&rev=925aac04f4ca58aceb83beef18cb7dae0715421b" - } - }, - "narHash": "sha256-KJl9ZLcMcEsLSPcwcWoc0Ac74/6HKC9LkVMeLwhyhlg=", - "originalUrl": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake", - "url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f" - }, "nixpkgs": { "inputs": {}, "narHash": "sha256-NB+H7zK3BB//zM127FqgbG4iAfY+nS/IOyO+uGWA5Ho=", diff --git a/flake.nix b/flake.nix index 6f2f81a..aece438 100644 --- a/flake.nix +++ b/flake.nix @@ -3,10 +3,7 @@ edition = 201909; - inputs.dhall-haskell.uri = - "git+https://github.com/dhall-lang/dhall-haskell?ref=flake"; - - outputs = { self, nixpkgs, dhall-haskell }: + outputs = { self, nixpkgs }: let localSystem = "x86_64-linux"; localPackages = nixpkgs.legacyPackages.${localSystem}; @@ -25,7 +22,6 @@ }; dontConfigure = true; dontBuild = true; - buildInputs = [ dhall-haskell.packages.${localSystem}.dhall ]; installPhase = '' find . -type f | while read FILE; do case $FILE in @@ -37,26 +33,25 @@ done local drv=$out - echo '{' >> manifest.tmp + echo -n '{' >> $manifest if [ -d $drv/bin ]; then - echo ', bin = {' >> manifest.tmp - find $drv/bin/ -type f -printf ', %f = { mapKey = "%f", mapValue = "%p" }\n' >> manifest.tmp - echo '}' >> manifest.tmp + echo -n ',bin={' >> $manifest + find $drv/bin/ -type f -printf ',%f={mapKey="%f",mapValue="%p"}\n' >> $manifest + echo -n '}' >> $manifest fi if [ -d $drv/lib ]; then - echo ', lib = {' >> manifest.tmp + echo -n ',lib={' >> $manifest find $drv/lib/ -type f -name '*.lib.so' -printf '%f "%p"\n' \ - | awk '{print ", "gensub(/.lib.so/, "", 1, $1)" = { mapKey = \""$1"\", mapValue = "$2" }" }'>> manifest.tmp - echo '}' >> manifest.tmp + | awk '{print ","gensub(/.lib.so/, "", 1, $1)"={mapKey=\""$1"\",mapValue="$2" }"}'>> $manifest + echo -n '}' >> $manifest fi if [ -d $drv/tar ]; then - echo ', tar = {' >> manifest.tmp + echo -n ',tar={' >> $manifest find $drv/tar/ -type f -name '*.tar' -printf '%f "%p"\n' \ - | awk '{print ""gensub(/.tar/, "", 1, $1)" = { mapKey = \""$1"\", mapValue = "$2" }" }'>> manifest.tmp - echo '}' >> manifest.tmp + | awk '{print ""gensub(/.tar/, "", 1, $1)"={mapKey=\""$1"\",mapValue="$2"}"}'>> $manifest + echo -n '}' >> $manifest fi - echo '}' >> manifest.tmp - dhall < manifest.tmp > $manifest + echo '}' >> $manifest ''; meta = { license = [ "LicenseRef-Genode" ];