mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, pkg-config, libX11, libXft, libXinerama, libXpm }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dzen2";
|
|
version = "0.9.5";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ libX11 libXft libXinerama libXpm ];
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/robm/dzen/tarball/master/dzen2-${version}git.tar.gz";
|
|
sha256 = "d4f7943cd39dc23fd825eb684b49dc3484860fa8443d30b06ee38af72a53b556";
|
|
};
|
|
|
|
patchPhase = ''
|
|
CFLAGS=" -Wall -Os ''${INCS} -DVERSION=\"''${VERSION}\" -DDZEN_XINERAMA -DDZEN_XPM -DDZEN_XFT `pkg-config --cflags xft`"
|
|
LIBS=" -L/usr/lib -lc -lXft -lXpm -lXinerama -lX11"
|
|
echo "CFLAGS=$CFLAGS" >>config.mk
|
|
echo "LIBS=$LIBS" >>config.mk
|
|
echo "LDFLAGS=$LIBS" >>config.mk
|
|
substituteInPlace config.mk --replace /usr/local "$out"
|
|
substituteInPlace gadgets/config.mk --replace /usr/local "$out"
|
|
'';
|
|
|
|
buildPhase = ''
|
|
mkdir -p $out/bin $out/man/man1
|
|
make clean install
|
|
cd gadgets
|
|
make clean install
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://github.com/robm/dzen";
|
|
license = lib.licenses.mit;
|
|
description = "X notification utility";
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|