summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/crx/default.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-01-05 13:37:16 +0100
committerlassulus <lassulus@lassul.us>2021-01-05 13:37:16 +0100
commit91e7352884668486a66ae963731670660d9b6516 (patch)
treeab79e50d669455ee28cd948dae1c703e642dfb73 /krebs/5pkgs/simple/crx/default.nix
parent81c31869c2afeb510c97141af12c72a6e2b44c97 (diff)
parentcbb28f34eee5b5c801dc0521d88ffae0cd1a4c81 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/5pkgs/simple/crx/default.nix')
-rw-r--r--krebs/5pkgs/simple/crx/default.nix50
1 files changed, 50 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..429a471df
--- /dev/null
+++ b/krebs/5pkgs/simple/crx/default.nix
@@ -0,0 +1,50 @@
+{ lib, pkgs, stdenv }:
+
+stdenv.mkDerivation rec {
+ pname = "crx";
+ version = "1.1.0";
+
+ src = pkgs.fetchgit {
+ url = https://cgit.krebsco.de/crx;
+ rev = "refs/tags/v${version}";
+ sha256 = "10xwrdxwbvqydayg6a4jcl3cfp4wi9ssm7a0dlnclkc4rmf6sv4a";
+ };
+
+ 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.file
+ pkgs.gnused
+ pkgs.openssl
+ pkgs.xxd
+ ];
+ crxmake = [
+ pkgs.coreutils
+ pkgs.gnused
+ pkgs.openssl
+ pkgs.xxd
+ pkgs.zip
+ ];
+ }
+ )
+ }
+ '';
+}