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 \
|
2018-01-19 06:26:03 +01:00
|
|
|
--replace "/usr/include/freetype2" "${freetype.dev}/include/freetype2" \
|
|
|
|
--replace "CC=gcc" ""
|
2016-09-05 00:08:37 +02:00
|
|
|
'';
|
|
|
|
|
2018-01-19 06:26:03 +01:00
|
|
|
CFLAGS = "-D_DARWIN_C_SOURCE";
|
2016-09-05 00:08:37 +02:00
|
|
|
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 ];
|
2018-01-19 06:26:03 +01:00
|
|
|
platforms = with platforms; unix;
|
2016-09-05 00:08:37 +02:00
|
|
|
};
|
|
|
|
}
|