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

39 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, freetype, libX11, libXi, libXt, libXft }:
2016-09-05 00:08:37 +02:00
stdenv.mkDerivation rec {
pname = "deadpixi-sam-unstable";
version = "2020-07-14";
2018-01-19 06:36:35 +01:00
src = fetchFromGitHub {
owner = "deadpixi";
repo = "sam";
rev = "5d8acb35d78c327d76f00a54857cbd566ed9bc11";
sha256 = "sha256-+vRh6nDPc3UnmEdqROHRel5Te0h5m4eiaERs492xciQ=";
2018-01-19 06:36:35 +01:00
};
2016-09-05 00:08:37 +02:00
postPatch = ''
substituteInPlace config.mk.def \
2018-01-19 06:26:03 +01:00
--replace "/usr/include/freetype2" "${freetype.dev}/include/freetype2" \
--replace "CC=gcc" "CC=${stdenv.cc.targetPrefix}cc"
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)" ];
2018-01-19 06:36:35 +01:00
buildInputs = [ libX11 libXi libXt libXft ];
2022-02-02 11:59:01 +01:00
# build fails when run in parallel
enableParallelBuilding = false;
2016-09-05 00:08:37 +02:00
postInstall = ''
mkdir -p $out/share/applications
mv deadpixi-sam.desktop $out/share/applications
'';
meta = with lib; {
homepage = "https://github.com/deadpixi/sam";
2016-09-05 00:08:37 +02:00
description = "Updated version of the sam text editor";
license = licenses.lpl-102;
2016-09-05 00:08:37 +02:00
maintainers = with maintainers; [ ramkromberg ];
platforms = platforms.unix;
2016-09-05 00:08:37 +02:00
};
}