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
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, coreutils, grim, gawk, swaylock
|
|
, imagemagick, getopt, fontconfig, makeWrapper
|
|
}:
|
|
|
|
let
|
|
depsPath = stdenv.lib.makeBinPath [
|
|
coreutils
|
|
grim
|
|
gawk
|
|
swaylock
|
|
imagemagick
|
|
getopt
|
|
fontconfig
|
|
];
|
|
in stdenv.mkDerivation rec {
|
|
pname = "swaylock-fancy-unstable";
|
|
version = "2020-02-22";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Big-B";
|
|
repo = "swaylock-fancy";
|
|
rev = "5cf977b12f372740aa7b7e5a607d583f93f1e028";
|
|
sha256 = "0laqwzi6069sgz91i69438ns0g2nq4zkqickavrf80h4g3gcs8vm";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace swaylock-fancy \
|
|
--replace "/usr/share" "$out/share"
|
|
'';
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/swaylock-fancy \
|
|
--prefix PATH : "${depsPath}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "This is an swaylock bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text";
|
|
homepage = "https://github.com/Big-B/swaylock-fancy";
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ ma27 ];
|
|
};
|
|
}
|