mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 01:20:40 +00:00
37 lines
1,023 B
Nix
37 lines
1,023 B
Nix
{ stdenv, fetchFromGitHub, freetype, libX11, libXi, libXt, libXft }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "2017-10-27";
|
|
name = "deadpixi-sam-unstable-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "deadpixi";
|
|
repo = "sam";
|
|
rev = "51693780fb1457913389db6634163998f9b775b8";
|
|
sha256 = "0nfkj93j4bgli4ixbk041nwi14rabk04kqg8krq4mj0044m1qywr";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace config.mk.def \
|
|
--replace "/usr/include/freetype2" "${freetype.dev}/include/freetype2" \
|
|
--replace "CC=gcc" ""
|
|
'';
|
|
|
|
CFLAGS = "-D_DARWIN_C_SOURCE";
|
|
makeFlags = [ "DESTDIR=$(out)" ];
|
|
buildInputs = [ libX11 libXi 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 ];
|
|
platforms = with platforms; unix;
|
|
};
|
|
}
|