1 { lib, stdenv, fetchFromGitHub, freetype, libX11, libXi, libXt, libXft }:
3 stdenv.mkDerivation rec {
4 pname = "deadpixi-sam-unstable";
5 version = "2020-07-14";
7 src = fetchFromGitHub {
10 rev = "5d8acb35d78c327d76f00a54857cbd566ed9bc11";
11 sha256 = "sha256-+vRh6nDPc3UnmEdqROHRel5Te0h5m4eiaERs492xciQ=";
15 substituteInPlace config.mk.def \
16 --replace "/usr/include/freetype2" "${freetype.dev}/include/freetype2" \
17 --replace "CC=gcc" "CC=${stdenv.cc.targetPrefix}cc" \
18 --replace "RXPATH=/usr/bin/ssh" "RXPATH=ssh"
21 CFLAGS = "-D_DARWIN_C_SOURCE";
22 makeFlags = [ "DESTDIR=$(out)" ];
23 buildInputs = [ libX11 libXi libXt libXft ];
24 # build fails when run in parallel
25 enableParallelBuilding = false;
28 substituteInPlace deadpixi-sam.desktop \
29 --replace "accessories-text-editor" "$out/share/icons/hicolor/scalable/apps/sam.svg"
30 mkdir -p $out/share/applications
31 mkdir -p $out/share/icons/hicolor/scalable/apps
32 mv deadpixi-sam.desktop $out/share/applications
33 mv sam.svg $out/share/icons/hicolor/scalable/apps
37 homepage = "https://github.com/deadpixi/sam";
38 description = "Updated version of the sam text editor";
39 license = licenses.lpl-102;
40 maintainers = with maintainers; [ ramkromberg ];
41 platforms = platforms.unix;