nur-packages

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

default.nix (858B)


      1 { lib, stdenv, fetchFromGitHub, fontconfig, imlib2, libXft, conf ? null }:
      2 
      3 stdenv.mkDerivation rec {
      4   pname = "mage";
      5   version = "2022-03-15";
      6 
      7   src = fetchFromGitHub {
      8     owner = "explosion-mental";
      9     repo = pname;
     10     rev = "8e5a13ef208eb2867fda1d62d227dc6c48f25cfd";
     11     hash = "sha256-5/q4EPl915V1CLkY/WGcWlt5PO27KPk6gapNcOemWO0=";
     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 }