nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (909B)


      1 { lib, stdenv, fetchFromGitHub }:
      2 
      3 stdenv.mkDerivation (finalAttrs: {
      4   pname = "dns-filter";
      5   version = "0-unstable-2021-04-14";
      6 
      7   src = fetchFromGitHub {
      8     owner = "depler";
      9     repo = "dns-filter";
     10     rev = "f2e9c9b451cc4caa52e61b464f73c166313fc8b6";
     11     hash = "sha256-WK3xlJFlYc6u03+6HSoyBaoC9VtD/i7cP1+oqpH/sfE=";
     12   };
     13 
     14   postPatch = ''
     15     substituteInPlace build.sh --replace-fail "gcc" "cc"
     16   '';
     17 
     18   buildPhase = ''
     19     sh ./build.sh
     20   '';
     21 
     22   env.NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion -Wno-error=implicit-function-declaration";
     23 
     24   installPhase = ''
     25     install -Dm755 dns-filter -t $out/bin
     26     install -Dm644 *.txt -t $out/share/dns-filter
     27   '';
     28 
     29   meta = with lib; {
     30     description = "Tiny DNS server with filtering requests";
     31     inherit (finalAttrs.src.meta) homepage;
     32     license = licenses.free;
     33     maintainers = [ maintainers.sikmir ];
     34     platforms = platforms.unix;
     35   };
     36 })