summaryrefslogtreecommitdiffstats
path: root/K_belwagen/default.nix
blob: c284ac861c0c43477e5dd63533f588735f31cdd0 (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
{ pkgs ? import <nixpkgs> {} }:

# TODO check if system has jack2 installed

pkgs.stdenv.mkDerivation {
  name = "K_belwagen-1";

  src = ./.;

  buildInputs = with pkgs; [
    coreutils
    jack2
    pkgconfig
  ];

  installPhase = ''
    mkdir -p $out/bin $out/lib
    cp alarm $out/bin
    cp a.out $out/lib
    sed -i '
      s:^\(jackd\|trap\|make\|cd\)\>:#&:
      s:\./a\.out:'$out/lib/a.out':
    ' $out/bin/alarm
  '';
}