mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
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
44 lines
1.0 KiB
Nix
44 lines
1.0 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchpatch }:
|
|
|
|
let
|
|
|
|
patch-base = "https://github.com/LukeSmithxyz/kjv/commit/";
|
|
|
|
add-apocrypha = fetchpatch {
|
|
url = patch-base + "b92b7622285d10464f9274f11e740bef90705bbc.patch";
|
|
sha256 = "0n4sj8p9m10fcair4msc129jxkkx5whqzhjbr5k4lfgp6nb1zk8k";
|
|
};
|
|
|
|
add-install-target = fetchpatch {
|
|
url = patch-base + "f4ad73539eb73f1890f4b791d8d38dd95900a4a4.patch";
|
|
sha256 = "1yzj72i5fkzn2i4wl09q6jx7nwn2h4jwm49fc23nxfwchzar9m1q";
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "kjv";
|
|
version = "unstable-2018-12-25";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bontibon";
|
|
repo = pname;
|
|
rev = "fda81a610e4be0e7c5cf242de655868762dda1d4";
|
|
sha256 = "1favfcjvd3pzz1ywwv3pbbxdg7v37s8vplgsz8ag016xqf5ykqqf";
|
|
};
|
|
|
|
patches = [ add-apocrypha add-install-target ];
|
|
|
|
makeFlags = [
|
|
"PREFIX=${placeholder "out"}"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "The Bible, King James Version";
|
|
homepage = "https://github.com/bontibon/kjv";
|
|
license = licenses.publicDomain;
|
|
maintainers = [ maintainers.jtobin ];
|
|
};
|
|
}
|
|
|