Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 49 lines 902 B view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 ncurses, 6}: 7 8stdenv.mkDerivation { 9 pname = "netris"; 10 version = "0.52"; 11 12 src = fetchFromGitHub { 13 owner = "naclander"; 14 repo = "netris"; 15 rev = "6773c9b2d39a70481a5d6eb5368e9ced6229ad2b"; 16 sha256 = "0gmxbpn50pnffidwjchkzph9rh2jm4wfq7hj8msp5vhdq5h0z9hm"; 17 }; 18 19 patches = [ 20 # https://github.com/naclander/netris/pull/1 21 ./configure-fixes-for-gcc-14.patch 22 ]; 23 24 buildInputs = [ 25 ncurses 26 ]; 27 28 configureScript = "./Configure"; 29 dontAddPrefix = true; 30 31 configureFlags = [ 32 "--cc" 33 "${stdenv.cc.targetPrefix}cc" 34 "-O2" 35 ]; 36 37 installPhase = '' 38 mkdir -p $out/bin 39 cp ./netris $out/bin 40 ''; 41 42 meta = with lib; { 43 description = "Free networked version of T*tris"; 44 mainProgram = "netris"; 45 license = licenses.gpl2Plus; 46 maintainers = with maintainers; [ patryk27 ]; 47 platforms = platforms.unix; 48 }; 49}