2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, freetype, libX11, libXi, libXt, libXft }:
|
2016-09-04 23:08:37 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "deadpixi-sam-unstable";
|
2021-12-26 04:51:23 +00:00
|
|
|
version = "2020-07-14";
|
2018-01-19 05:36:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deadpixi";
|
|
|
|
repo = "sam";
|
2021-12-26 04:51:23 +00:00
|
|
|
rev = "5d8acb35d78c327d76f00a54857cbd566ed9bc11";
|
|
|
|
sha256 = "sha256-+vRh6nDPc3UnmEdqROHRel5Te0h5m4eiaERs492xciQ=";
|
2018-01-19 05:36:35 +00:00
|
|
|
};
|
2016-09-04 23:08:37 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace config.mk.def \
|
2018-01-19 05:26:03 +00:00
|
|
|
--replace "/usr/include/freetype2" "${freetype.dev}/include/freetype2" \
|
2021-12-26 04:51:23 +00:00
|
|
|
--replace "CC=gcc" "CC=${stdenv.cc.targetPrefix}cc"
|
2016-09-04 23:08:37 +01:00
|
|
|
'';
|
|
|
|
|
2018-01-19 05:26:03 +00:00
|
|
|
CFLAGS = "-D_DARWIN_C_SOURCE";
|
2016-09-04 23:08:37 +01:00
|
|
|
makeFlags = [ "DESTDIR=$(out)" ];
|
2018-01-19 05:36:35 +00:00
|
|
|
buildInputs = [ libX11 libXi libXt libXft ];
|
2016-09-04 23:08:37 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
mv deadpixi-sam.desktop $out/share/applications
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-12-26 04:51:23 +00:00
|
|
|
homepage = "https://github.com/deadpixi/sam";
|
2016-09-04 23:08:37 +01:00
|
|
|
description = "Updated version of the sam text editor";
|
2021-12-26 04:51:23 +00:00
|
|
|
license = licenses.lpl-102;
|
2016-09-04 23:08:37 +01:00
|
|
|
maintainers = with maintainers; [ ramkromberg ];
|
2021-12-26 04:51:23 +00:00
|
|
|
platforms = platforms.unix;
|
2016-09-04 23:08:37 +01:00
|
|
|
};
|
|
|
|
}
|