Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 openssl, 7}: 8 9stdenv.mkDerivation { 10 pname = "decoder"; 11 version = "unstable-2021-11-20"; 12 13 src = fetchFromGitHub { 14 owner = "PeterPawn"; 15 repo = "decoder"; 16 rev = "da0f826629d4e7b873f9d1a39f24c50ff0a68cd2"; 17 sha256 = "sha256-1sT1/iwtc2ievmLuNuooy9b14pTs1ZC5noDwzFelk7w="; 18 }; 19 20 patches = [ 21 # Pull fix pending upstream inclusion for -fno-common toolchains: 22 # https://github.com/PeterPawn/decoder/pull/29 23 (fetchpatch { 24 name = "fno-common.patch"; 25 url = "https://github.com/PeterPawn/decoder/commit/843ac477c31108023d8008581bf91c5a3acc1859.patch"; 26 sha256 = "sha256-rRylz8cxgNyPSqL/THdgEBpzcVx1K+xbjUn4PwP9Jn4="; 27 }) 28 ]; 29 30 buildInputs = [ 31 openssl 32 ]; 33 34 makeFlags = [ "OPENSSL=y" ]; 35 36 installPhase = '' 37 runHook preInstall 38 39 install -Dm755 src/decoder "$out/bin/decoder" 40 41 runHook postInstall 42 ''; 43 44 meta = with lib; { 45 homepage = "https://github.com/PeterPawn/decoder"; 46 description = ''"secrets" decoding for FRITZ!OS devices''; 47 mainProgram = "decoder"; 48 license = licenses.gpl2Plus; 49 platforms = platforms.linux; 50 maintainers = with maintainers; [ Luflosi ]; 51 }; 52}