Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / bu / bullshit / package.nix
blob9345d2ae7d9294a4ff66cf81266fe5b353318a4a
1 { lib
2 , stdenvNoCC
3 , fetchFromGitHub
4 , gawk
5 , nix-update-script
6 }:
7 stdenvNoCC.mkDerivation {
8   pname = "bullshit";
9   version = "0-unstable-2018-05-28";
11   src = fetchFromGitHub {
12     owner = "fceschmidt";
13     repo = "bullshit-arch";
14     rev = "d65e4bbbea76bb752842c2c464154a7b417783fa";
15     hash = "sha256-sqtQDaWtfhn9XYRsF8lVLHYb+7o9Hf7rLKsX6dw3Sh4=";
16   };
18   installPhase = ''
19     runHook preInstall
20     install -Dm555 src/bullshit -t $out/bin
21     install -Dm444 src/bullshit_lib $out/share/wordlists/bullshit.txt
22     runHook postInstall
23   '';
25   fixupPhase = ''
26     runHook preFixup
27     patchShebangs $out/bin/bullshit
28     substituteInPlace $out/bin/bullshit \
29         --replace /usr/lib/bullshit $out/share/wordlists/bullshit.txt \
30         --replace awk '${gawk}/bin/awk'
31     runHook postFixup
32   '';
34   passthru.updateScript = nix-update-script { };
36   meta = with lib; {
37     description = "Nonsense phrase generator";
38     mainProgram = "bullshit";
39     homepage = "https://github.com/fceschmidt/bullshit-arch";
40     license = licenses.gpl2Only;
41     maintainers = with maintainers; [ krloer ];
42     inherit (gawk.meta) platforms;
43   };