nixpkgs/pkgs/applications/editors/deadpixi-sam/default.nix

37 lines
993 B
Nix
Raw Normal View History

2016-09-05 00:08:37 +02:00
{ stdenv, fetchFromGitHub, freetype, libX11, libXt, libXft
2016-09-20 05:59:57 +02:00
, version ? "2016-10-08"
, rev ? "a17c4a9c2a1af2de0a756fe16d482e0db88c0541"
, sha256 ? "03xmfzlijz4gbmr7l0pb1gl9kmlz1ab3hr8d51innvlasy4g6xgj"
2016-09-05 00:08:37 +02:00
}:
stdenv.mkDerivation rec {
2016-09-20 05:59:57 +02:00
inherit version;
name = "deadpixi-sam-unstable-${version}";
2016-09-05 00:08:37 +02:00
src = fetchFromGitHub {
2016-09-20 05:59:57 +02:00
inherit sha256 rev;
2016-09-05 00:08:37 +02:00
owner = "deadpixi";
repo = "sam";
};
postPatch = ''
substituteInPlace config.mk.def \
--replace "/usr/include/freetype2" "${freetype.dev}/include/freetype2"
'';
makeFlags = [ "DESTDIR=$(out)" ];
buildInputs = [ libX11 libXt libXft ];
postInstall = ''
mkdir -p $out/share/applications
mv deadpixi-sam.desktop $out/share/applications
'';
meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "Updated version of the sam text editor";
license = with licenses; lpl-102;
maintainers = with maintainers; [ ramkromberg ];
platforms = with platforms; linux;
};
}