summaryrefslogtreecommitdiff
path: root/jotpass.nix
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2024-04-19 13:11:51 +0200
committerStefan Kreutz <mail@skreutz.com>2024-04-19 13:12:05 +0200
commit0a0f1a16134a74868e10fc2062996825b7cc41f3 (patch)
tree6d06b97e64f9747eaf4d82fb3cf5eedeb6d99c04 /jotpass.nix
parent41134866c2646092c7baa9e0e545c50354aab934 (diff)
downloadjotpass-0a0f1a16134a74868e10fc2062996825b7cc41f3.tar
Add experimental Nix flakenix
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.