biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / misc / shallot / default.nix
blob4fbd07f38e329e9ce81f6cdd2a2a7f539af05503
1 { lib, stdenv, fetchFromGitHub, fetchpatch
2 , openssl
3 }:
5 stdenv.mkDerivation rec {
6   pname = "shallot";
7   version = "0.0.3";
9   src = fetchFromGitHub {
10     owner = "katmagic";
11     repo = "Shallot";
12     rev = "shallot-${version}";
13     sha256 = "0cjafdxvjkwb9vyifhh11mw0la7yfqswqwqmrfp1fy9jl7m0il9k";
14   };
16   buildInputs = [ openssl ];
18   patches = [
19     (fetchpatch {
20       url = "https://github.com/katmagic/Shallot/commit/c913088dfaaaf249494514f20a62f2a17b5c6606.patch";
21       sha256 = "19l1ppbxpdb0736f7plhybj08wh6rqk1lr3bxsp8jpzpnkh114b2";
22     })
23     (fetchpatch {
24       url = "https://github.com/katmagic/Shallot/commit/cd6628d97b981325e700a38f408a43df426fd569.patch";
25       sha256 = "1gaffp5wp1l5p2qdk0ix3i5fhzpx4xphl0haa6ajhqn8db7hbr9y";
26     })
27     (fetchpatch {
28       url = "https://github.com/katmagic/Shallot/commit/5c7c1ccecbbad5a121c50ba7153cbbee7ee0ebf9.patch";
29       sha256 = "1zmll4iqz39zwk8vj40n1dpvyq3403l64p2127gsjgh2l2v91s4k";
30     })
31   ];
33   # Workaround build failure on -fno-common toolchains like upstream
34   # gcc-10. Otherwise build fails as:
35   #   ld: src/shallot.o:(.bss+0x8): multiple definition of `lucky_thread'; src/error.o:(.bss+0x8): first defined here
36   env.NIX_CFLAGS_COMPILE = "-fcommon";
38   installPhase = ''
39     mkdir -p $out/bin
40     cp ./shallot $out/bin/
41   '';
43   meta = {
44     description = "Allows you to create customized .onion addresses for your hidden service";
46     license = lib.licenses.mit;
47     homepage = "https://github.com/katmagic/Shallot";
48     platforms = lib.platforms.linux;
49     mainProgram = "shallot";
50   };