aboutsummaryrefslogtreecommitdiff
path: root/pkgs/crypto/cardano
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-26 12:12:12 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-26 12:12:12 +0200
commit98de2045a749b25d031b174c940096b4f5406b9d (patch)
tree3da1a45ec067551d233bb800eee912d44c5e7fdd /pkgs/crypto/cardano
parenta2230e848bc85e484ef14163ac90fdb7045855f7 (diff)
downloadNix-98de2045a749b25d031b174c940096b4f5406b9d.tar.gz
Nix-98de2045a749b25d031b174c940096b4f5406b9d.tar.zst
Nix-98de2045a749b25d031b174c940096b4f5406b9d.zip
Move more packages to split files
Diffstat (limited to 'pkgs/crypto/cardano')
-rw-r--r--pkgs/crypto/cardano/daedalus.json15
-rw-r--r--pkgs/crypto/cardano/default.nix27
2 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/crypto/cardano/daedalus.json b/pkgs/crypto/cardano/daedalus.json
new file mode 100644
index 0000000..5bb72f4
--- /dev/null
+++ b/pkgs/crypto/cardano/daedalus.json
@@ -0,0 +1,15 @@
1{
2 "tag": "0.12.1",
3 "meta": {
4 "name": "daedalus",
5 "url": "https://github.com/input-output-hk/daedalus",
6 "branch": "refs/tags/0.12.1"
7 },
8 "github": {
9 "owner": "input-output-hk",
10 "repo": "daedalus",
11 "rev": "1276852b9a766d9fd4cda10561254f1a8ddd33ed",
12 "sha256": "0jf6ibwf0r4587g1ixq6zvi40kzwy137jgay5136yfbg15xw14k2",
13 "fetchSubmodules": true
14 }
15}
diff --git a/pkgs/crypto/cardano/default.nix b/pkgs/crypto/cardano/default.nix
new file mode 100644
index 0000000..b7cfb9f
--- /dev/null
+++ b/pkgs/crypto/cardano/default.nix
@@ -0,0 +1,27 @@
1{ stdenv, fetchedGithub }:
2let
3 daedalusOrig = (import (fetchedGithub ./daedalus.json).src {}).daedalus;
4 cfg = stdenv.mkDerivation rec {
5 name = "launcher-config-custom";
6 src = daedalusOrig.cfg;
7 installPhase = ''
8 cp -a $src $out
9 chmod -R u+w $out
10 cd $out/etc
11 sed -e "/^walletPath/d" -e "/^walletArgs/d" launcher-config.yaml > launcher-config-server-only.yaml
12 '';
13 };
14in
15stdenv.mkDerivation rec {
16 name = "daedalus-custom";
17 src = daedalusOrig;
18 buildInputs = [ daedalusOrig ];
19 installPhase = ''
20 cp -a $src $out
21 chmod -R u+w $out
22 cd $out/bin
23 sed -i -e "s@${builtins.storeDir}/[0-9a-z]*-daedalus-config@${cfg}/etc@" daedalus
24 sed -e "s@${cfg}/etc/launcher-config.yaml@${cfg}/etc/launcher-config-server-only.yaml@" daedalus > daedalus-server-only
25 chmod a+x daedalus-server-only
26 '';
27}