mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
37 lines
1011 B
Nix
37 lines
1011 B
Nix
{ lib, stdenv, fetchFromGitHub, freetype, libX11, libXi, libXt, libXft }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "2017-10-27";
|
|
pname = "deadpixi-sam-unstable";
|
|
|
|
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 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;
|
|
};
|
|
}
|