nixpkgs/pkgs/by-name/i3/i3lock-pixeled/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

42 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";
mainProgram = "i3lock-pixeled";
homepage = "https://gitlab.com/Ma27/i3lock-pixeled";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ ma27 ];
};
}