Преглед изворни кода

Remove dhall-haskell dependency

tags/20.02
Emery Hemingway пре 1 година
родитељ
комит
8c2aafed45
2 измењених фајлова са 12 додато и 36 уклоњено
  1. 0
    19
      flake.lock
  2. 12
    17
      flake.nix

+ 0
- 19
flake.lock Прегледај датотеку

@@ -1,24 +1,5 @@
1 1
 {
2 2
     "inputs": {
3
-        "dhall-haskell": {
4
-            "inputs": {
5
-                "nixpkgs": {
6
-                    "inputs": {},
7
-                    "narHash": "sha256-wJg4DA700SoQbEz61448sR6BgxRa1R92K3vvCV1g+HY=",
8
-                    "originalUrl": "git+https://github.com/nixos/nixpkgs.git?ref=18.09-beta&rev=1d4de0d552ae9aa66a5b8dee5fb0650a4372d148",
9
-                    "url": "git+https://github.com/nixos/nixpkgs.git?ref=18.09-beta&rev=1d4de0d552ae9aa66a5b8dee5fb0650a4372d148"
10
-                },
11
-                "nixpkgsStaticLinux": {
12
-                    "inputs": {},
13
-                    "narHash": "sha256-famU3pJZ4vkElV9qc71HmyRVSvcrAhfMZ0UJKpmmKP8=",
14
-                    "originalUrl": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working",
15
-                    "url": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working&rev=925aac04f4ca58aceb83beef18cb7dae0715421b"
16
-                }
17
-            },
18
-            "narHash": "sha256-KJl9ZLcMcEsLSPcwcWoc0Ac74/6HKC9LkVMeLwhyhlg=",
19
-            "originalUrl": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake",
20
-            "url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f"
21
-        },
22 3
         "nixpkgs": {
23 4
             "inputs": {},
24 5
             "narHash": "sha256-NB+H7zK3BB//zM127FqgbG4iAfY+nS/IOyO+uGWA5Ho=",

+ 12
- 17
flake.nix Прегледај датотеку

@@ -3,10 +3,7 @@
3 3
 
4 4
   edition = 201909;
5 5
 
6
-  inputs.dhall-haskell.uri =
7
-    "git+https://github.com/dhall-lang/dhall-haskell?ref=flake";
8
-
9
-  outputs = { self, nixpkgs, dhall-haskell }:
6
+  outputs = { self, nixpkgs }:
10 7
     let
11 8
       localSystem = "x86_64-linux";
12 9
       localPackages = nixpkgs.legacyPackages.${localSystem};
@@ -25,7 +22,6 @@
25 22
             };
26 23
             dontConfigure = true;
27 24
             dontBuild = true;
28
-            buildInputs = [ dhall-haskell.packages.${localSystem}.dhall ];
29 25
             installPhase = ''
30 26
               find . -type f | while read FILE; do
31 27
                 case $FILE in
@@ -37,26 +33,25 @@
37 33
               done
38 34
 
39 35
               local drv=$out
40
-              echo '{' >> manifest.tmp
36
+              echo -n '{' >> $manifest
41 37
               if [ -d $drv/bin ]; then
42
-                echo ', bin = {' >> manifest.tmp
43
-                find $drv/bin/ -type f -printf ', %f = { mapKey = "%f", mapValue = "%p" }\n' >> manifest.tmp
44
-                echo '}' >> manifest.tmp
38
+                echo -n ',bin={' >> $manifest
39
+                find $drv/bin/ -type f -printf ',%f={mapKey="%f",mapValue="%p"}\n' >> $manifest
40
+                echo -n '}' >> $manifest
45 41
               fi
46 42
               if [ -d $drv/lib ]; then
47
-                echo ', lib = {' >> manifest.tmp
43
+                echo -n ',lib={' >> $manifest
48 44
                 find $drv/lib/ -type f -name '*.lib.so' -printf '%f "%p"\n' \
49
-                  | awk '{print ", "gensub(/.lib.so/, "", 1, $1)" = { mapKey = \""$1"\", mapValue = "$2" }" }'>> manifest.tmp
50
-                echo '}' >> manifest.tmp
45
+                  | awk '{print ","gensub(/.lib.so/, "", 1, $1)"={mapKey=\""$1"\",mapValue="$2" }"}'>> $manifest
46
+                echo -n '}' >> $manifest
51 47
               fi
52 48
               if [ -d $drv/tar ]; then
53
-                echo ', tar = {' >> manifest.tmp
49
+                echo -n ',tar={' >> $manifest
54 50
                 find $drv/tar/ -type f -name '*.tar' -printf '%f "%p"\n' \
55
-                  | awk '{print ""gensub(/.tar/, "", 1, $1)" = { mapKey = \""$1"\", mapValue = "$2" }" }'>> manifest.tmp
56
-                echo '}' >> manifest.tmp
51
+                  | awk '{print ""gensub(/.tar/, "", 1, $1)"={mapKey=\""$1"\",mapValue="$2"}"}'>> $manifest
52
+                echo -n '}' >> $manifest
57 53
               fi
58
-              echo '}' >> manifest.tmp
59
-              dhall < manifest.tmp > $manifest
54
+              echo '}' >> $manifest
60 55
             '';
61 56
             meta = {
62 57
               license = [ "LicenseRef-Genode" ];

Loading…
Откажи
Сачувај