summaryrefslogtreecommitdiff
path: root/jotpass.nix
blob: 2bce578eb2c05b3c98df20db7e0c054aaf39de5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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.