summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/crx
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-01-03 17:00:07 +0100
committertv <tv@krebsco.de>2021-01-03 17:00:07 +0100
commit2de8aeb09a29551857814ab56dd82e1e5022f4bb (patch)
tree2f0bc1fab898f21f2fe8dd50d2dddf737cc8a0dd /krebs/5pkgs/simple/crx
parent9c2529b2910bdb3b73bcd69ed958d82e01bf7943 (diff)
crx: init at 1.0.0
Diffstat (limited to 'krebs/5pkgs/simple/crx')
-rw-r--r--krebs/5pkgs/simple/crx/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/crx/default.nix b/krebs/5pkgs/simple/crx/default.nix
new file mode 100644
index 000000000..180c6e727
--- /dev/null
+++ b/krebs/5pkgs/simple/crx/default.nix
@@ -0,0 +1,49 @@
+{ lib, pkgs, stdenv }:
+
+stdenv.mkDerivation rec {
+ pname = "crx";
+ version = "1.0.0";
+
+ src = pkgs.fetchgit {
+ url = https://cgit.krebsco.de/crx;
+ rev = "refs/tags/v${version}";
+ sha256 = "0nrbqw94lb0fzk9991vaqplszqzdij6vbf1kb2hi48a9bzg8h6z3";
+ };
+
+ phases = [
+ "unpackPhase"
+ "installPhase"
+ ];
+
+ installPhase = ''
+ mkdir -p $out/bin
+
+ ${lib.concatStrings
+ (lib.mapAttrsToList
+ (name: path: /* sh */ ''
+ sed \
+ 's,^set -efu$,&\nPATH=${lib.makeBinPath path}; export PATH,' \
+ < ./${name} \
+ > $out/bin/${name}
+ chmod +x $out/bin/${name}
+ '')
+ {
+ crxid = [
+ pkgs.bc
+ pkgs.coreutils
+ pkgs.gnused
+ pkgs.openssl
+ pkgs.xxd
+ ];
+ crxmake = [
+ pkgs.coreutils
+ pkgs.gnused
+ pkgs.openssl
+ pkgs.xxd
+ pkgs.zip
+ ];
+ }
+ )
+ }
+ '';
+}