nixpkgs/pkgs/applications/window-managers/i3/lock-fancy-rapid.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

33 lines
891 B
Nix

{ lib, stdenv, fetchFromGitHub, xorg, i3lock }:
stdenv.mkDerivation rec {
pname = "i3lock-fancy-rapid";
version = "2019-10-09";
src = fetchFromGitHub {
owner = "yvbbrjdr";
repo = "i3lock-fancy-rapid";
rev = "c67f09bc8a48798c7c820d7d4749240b10865ce0";
sha256 = "0jhvlj6v6wx70239pgkjxd42z1s2bzfg886ra6n1rzsdclf4rkc6";
};
buildInputs = [ xorg.libX11 ];
propagatedBuildInputs = [ i3lock ];
postPatch = ''
substituteInPlace i3lock-fancy-rapid.c \
--replace '"i3lock"' '"${i3lock}/bin/i3lock"'
'';
installPhase = ''
install -D i3lock-fancy-rapid $out/bin/i3lock-fancy-rapid
'';
meta = with lib; {
description = "A faster implementation of i3lock-fancy";
homepage = "https://github.com/yvbbrjdr/i3lock-fancy-rapid";
maintainers = with maintainers; [ nickhu ];
license = licenses.bsd3;
platforms = platforms.linux;
};
}