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
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ lib, stdenv, i3lock, imagemagick, scrot, playerctl, fetchFromGitLab }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "i3lock-pixeled";
|
|
version = "1.2.1";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "Ma27";
|
|
repo = "i3lock-pixeled";
|
|
rev = version;
|
|
sha256 = "1l9yjf9say0mcqnnjkyj4z3f6y83bnx4jsycd1h10p3m8afbh8my";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
i3lock
|
|
imagemagick
|
|
scrot
|
|
playerctl
|
|
];
|
|
|
|
makeFlags = [
|
|
"PREFIX=$(out)/bin"
|
|
];
|
|
|
|
patchPhase = ''
|
|
substituteInPlace i3lock-pixeled \
|
|
--replace i3lock "${i3lock}/bin/i3lock" \
|
|
--replace convert "${imagemagick}/bin/convert" \
|
|
--replace scrot "${scrot}/bin/scrot" \
|
|
--replace playerctl "${playerctl}/bin/playerctl"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Simple i3lock helper which pixels a screenshot by scaling it down and up to get a pixeled version of the screen when the lock is active";
|
|
homepage = "https://gitlab.com/Ma27/i3lock-pixeled";
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ ma27 ];
|
|
};
|
|
}
|