summaryrefslogtreecommitdiff
path: root/jotpass.nix
diff options
context:
space:
mode:
Diffstat (limited to 'jotpass.nix')
-rw-r--r--jotpass.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/jotpass.nix b/jotpass.nix
new file mode 100644
index 0000000..2bce578
--- /dev/null
+++ b/jotpass.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, oksh, outils, bc, makeBinaryWrapper }:
+stdenv.mkDerivation rec {
+ name = "jotpass-${version}";
+ version = "0.2.0-snapshot"; # TODO: set or infer correct version
+
+ src = ./.;
+
+ postPatch = ''
+ substituteInPlace jotpass.ksh --replace "/bin/ksh" "${oksh}/bin/oksh"
+ '';
+
+ nativeBuildInputs = [
+ makeBinaryWrapper
+ ];
+
+ buildInputs = [
+ oksh
+ outils
+ bc
+ ];
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp jotpass.ksh $out/bin/jotpass
+ mkdir -p $out/man/man1
+ cp jotpass.1 $out/man/man1/jotpass.1
+ wrapProgram $out/bin/jotpass --prefix PATH : ${lib.makeBinPath [ oksh outils bc ]}
+ '';
+}
Generated by cgit. See skreutz.com for my tech blog and contact information.