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

37 lines
1,011 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, freetype, libX11, libXi, libXt, libXft }:
2016-09-05 00:08:37 +02:00
stdenv.mkDerivation rec {
2018-01-19 06:36:35 +01:00
version = "2017-10-27";
pname = "deadpixi-sam-unstable";
2018-01-19 06:36:35 +01:00
src = fetchFromGitHub {
owner = "deadpixi";
repo = "sam";
rev = "51693780fb1457913389db6634163998f9b775b8";
sha256 = "0nfkj93j4bgli4ixbk041nwi14rabk04kqg8krq4mj0044m1qywr";
};
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" ""
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 ];
2016-09-05 00:08:37 +02:00
postInstall = ''
mkdir -p $out/share/applications
mv deadpixi-sam.desktop $out/share/applications
'';
meta = with lib; {
2016-09-05 00:08:37 +02:00
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
};
}