nur-packages

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

default.nix (859B)


      1 { lib, stdenv, fetchFromGitHub, fontconfig, imlib2, libXft, conf ? null }:
      2 
      3 stdenv.mkDerivation rec {
      4   pname = "mage";
      5   version = "2022-08-28";
      6 
      7   src = fetchFromGitHub {
      8     owner = "explosion-mental";
      9     repo = "mage";
     10     rev = "6632e9080af56a2c045fc9b008cabc06782e4e04";
     11     hash = "sha256-7lCuwVB2MS9PkLRQc9XcunQGkOab46PYiSVQvJGMSng=";
     12   };
     13 
     14   configFile = lib.optionalString (conf!=null) (builtins.toFile "config.h" conf);
     15   preBuild = lib.optionalString (conf!=null) "cp ${configFile} config.h";
     16 
     17   buildInputs = [ fontconfig imlib2 libXft ];
     18 
     19   makeFlags = [ "CC:=$(CC)" ];
     20 
     21   installFlags = [ "PREFIX=$(out)" ];
     22 
     23   meta = with lib; {
     24     description = "iMAGE viewer";
     25     inherit (src.meta) homepage;
     26     license = licenses.gpl2Only;
     27     maintainers = [ maintainers.sikmir ];
     28     platforms = platforms.linux;
     29     skip.ci = stdenv.isDarwin;
     30   };
     31 }