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