summary refs log tree commit diff
path: root/pkgs/os-specific/linux/statifier/default.nix
blob: dd62d6d9d0715139c85f1b5e2dae7f79eca211ec (plain) (blame)
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
{ stdenv, fetchurl, gcc_multi, glibc_multi }:

let version = "1.7.3"; in
stdenv.mkDerivation {
  name = "statifier-${version}";

  src = fetchurl {
    url = "mirror://sourceforge/statifier/statifier-${version}.tar.gz";
    sha256 = "0jc67kq3clkdwvahpr2bjp2zix4j7z7z8b7bcn1b3g3sybh1cbd6";
  };

  buildInputs = [ gcc_multi glibc_multi ];

  phaseNames = [ "patchPhase" "installPhase" ];

  postPatch = ''
    sed -e s@/usr/@"$out/"@g -i */Makefile src/statifier
    sed -e s@/bin/bash@"${stdenv.shell}"@g -i src/*.sh
  '';

  meta = with stdenv.lib; {
    description = "Tool for creating static Linux binaries";
    platforms = with platforms; linux;
  };
}