nixpkgs: 2024-03-21 -> 2024-03-22

```
• Updated input 'nixpkgs-next-unpatched':
    'github:nixos/nixpkgs/33cddc79aa062e243c59d3ac36b8b938f267748a' (2024-03-21)
  → 'github:nixos/nixpkgs/86b5ff8306a63bb266590018b21d2ae502a74880' (2024-03-22)
• Updated input 'nixpkgs-unpatched':
    'github:nixos/nixpkgs/783b241f949bea90e3347ce516ad8af84bde3126' (2024-03-21)
  → 'github:nixos/nixpkgs/6e147dce88054c47dd90c0be8c33500e023f8261' (2024-03-22)
```
This commit is contained in:
Colin 2024-03-22 02:28:37 +00:00
parent cdac23211c
commit 1e25f37774
5 changed files with 147 additions and 52 deletions

View File

@ -167,11 +167,11 @@
},
"nixpkgs-next-unpatched": {
"locked": {
"lastModified": 1711022479,
"narHash": "sha256-MjOP3LgJiVmBPdJ8kjis6xWWpiCW8x/eFcAkbL36AtA=",
"lastModified": 1711065747,
"narHash": "sha256-O9UwPyQt/QozmQihe0Ki+fge9whuAY5ITqgzCb4Yxoo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "33cddc79aa062e243c59d3ac36b8b938f267748a",
"rev": "86b5ff8306a63bb266590018b21d2ae502a74880",
"type": "github"
},
"original": {
@ -199,11 +199,11 @@
},
"nixpkgs-unpatched": {
"locked": {
"lastModified": 1711043170,
"narHash": "sha256-UURzpCgi6OAMjqEMEpV1mmtCTbrHmzkxxR5vszeqXgs=",
"lastModified": 1711073802,
"narHash": "sha256-ehHutvR+qneRYf7GbCTXC6xfYfgc4IGI1suSKyIJALE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "783b241f949bea90e3347ce516ad8af84bde3126",
"rev": "6e147dce88054c47dd90c0be8c33500e023f8261",
"type": "github"
},
"original": {

View File

@ -15,7 +15,7 @@
# disable expensive sambda dependency; i don't use it.
packageUnwrapped = pkgs.handbrake.override {
ffmpeg_5-full = pkgs.ffmpeg_5-full.override {
ffmpeg-full = pkgs.ffmpeg-full.override {
withSamba = false;
};
};

View File

@ -32,6 +32,47 @@ in [
# etc, where "date" is like "20240228181608"
# and can be found with `nix-repl > :lf . > lastModifiedDate`
# (fetchpatch' {
# # prUrl = "https://github.com/NixOS/nixpkgs/pull/295712"; #< doesn't apply to master
# saneCommit = "ccd5eb1f6e00739fb003e0c4bd6eafd5d8372c2a";
# title = "luarocks: 3.10.0 -> 3.11.0";
# hash = "sha256-3F5EFKUgeDPVGRqSkT1udcwCYviGCoKhWpUSYhpTGlQ=";
# merged.staging = "20240321000000";
# })
# (fetchpatch' {
# # prUrl = "https://github.com/NixOS/nixpkgs/pull/293619"; #< reverts this!
# saneCommit = "8b0212e67557742c10799a8a36fb4aefd476e58a";
# title = "luarocks: 3.10.0 -> 3.9.2";
# hash = "sha256-EDvkMaUHs1VedbnMNMdXfLfB+uZC4tp8ZWj4T/Z4KUo=";
# })
(fetchpatch' {
prUrl = "https://github.com/NixOS/nixpkgs/pull/298001";
saneCommit = "d599839060400762a67d2c01d15b102ffe75e703";
title = "gnupg: fix cross compilation";
hash = "sha256-Q6u9ThGd9V3V/sLZmABt35BHkTv77WeoPv/Rx3+APDs=";
})
(fetchpatch' {
# fixes build break
prUrl = "https://github.com/NixOS/nixpkgs/pull/297984";
title = "handbrake: 1.6.1 -> 1.7.3";
hash = "sha256-WltkYq8frIzFFICo3IOyPjTr/advYEHuVFVGH4E9BKE=";
})
(fetchpatch' {
# fixes build break
prUrl = "https://github.com/NixOS/nixpkgs/pull/297929";
title = "space-cadet-pinball: 2.0.1 -> 2.1.0";
hash = "sha256-XntS18eEnB29zjV8jWTzVI0JUHWysjv1Z/ooIW4nvEo=";
})
(fetchpatch' {
# fixes build break
prUrl = "https://github.com/NixOS/nixpkgs/pull/297581";
title = "pwvucontrol: 0.2 -> 0.3.1";
hash = "sha256-OX6qx4WbQzZR2bu04nPHk9lURGH7kN0TRmeKOXfzCT8=";
})
(fetchpatch' {
prUrl = "https://github.com/NixOS/nixpkgs/pull/292868";
saneCommit = "f090c1cd6bb5bbb14a86ec90ced78ca1a165a4fe";
@ -40,12 +81,12 @@ in [
hash = "sha256-AzkMYm9Pm85Xfm+nd44oKIULZYGyMXulmjFbutouysc=";
})
# TODO: rebase (or split into smaller PRs)
# (fetchpatch' {
# prUrl = "https://github.com/NixOS/nixpkgs/pull/292415";
# title = "sway/hyprland: cross compilation fixes";
# hash = "sha256-3BGZK5Plx1IJzKHv19RwcRWQ4S+cbUbsPbEzpxFEYsI=";
# })
(fetchpatch' {
# TODO: rebase (or split into smaller PRs)
prUrl = "https://github.com/NixOS/nixpkgs/pull/292415";
title = "sway/hyprland: cross compilation fixes";
hash = "sha256-IDf8OcZzFgw0DalxzBqbqP7TZVnZkzoRHQ51RlR1xWc=";
})
# (fetchpatch' {
# title = "nixos/slskd: allow omitting username from yaml config";

View File

@ -30,6 +30,7 @@
, cmake
, dpkg
, fetchFromGitHub
, fetchFromGitLab
, fetchgit
, fetchurl
, gettext
@ -97,32 +98,68 @@ let
"${src}/base/thirdparty/luajit/koreader-luajit-enable-table_pack.patch"
];
});
luaEnv = luajit52.withPackages (ps: with ps; [
(buildLuarocksPackage {
# needed by KOReader's lua-Spore
pname = "luajson";
version = "1.3.4-1";
src = fetchgit {
url = "https://github.com/harningt/luajson.git";
# rev = "1.3.4";
# 1.3.4 (released 2017) has some incompatible bugs with lpeg library.
# see: <https://github.com/harningt/luajson/commit/6ecaf9bea8b121a9ffca5a470a2080298557b55d>
rev = "6ecaf9bea8b121a9ffca5a470a2080298557b55d";
hash = "sha256-56G0NqIpavKHMQWUxy+Bp7G4ZKrQwUZ2C5e7GJxUJeg=";
overlayedLuaPkgs = luaPkgs: let
ps = with ps; {
luajson = buildLuarocksPackage rec {
# needed by KOReader's lua-Spore
pname = "luajson";
version = "1.3.4-1";
src = fetchFromGitHub {
owner = "harningt";
repo = "luajson";
# rev = "1.3.4";
# 1.3.4 (released 2017) has some incompatible bugs with lpeg library.
# see: <https://github.com/harningt/luajson/commit/6ecaf9bea8b121a9ffca5a470a2080298557b55d>
rev = "6ecaf9bea8b121a9ffca5a470a2080298557b55d";
hash = "sha256-56G0NqIpavKHMQWUxy+Bp7G4ZKrQwUZ2C5e7GJxUJeg=";
};
knownRockspec = (fetchurl {
url = "mirror://luarocks/${pname}-${version}.rockspec";
hash = "sha256-+S4gfa6QaOMmOCDX8TxBq3kFWlbaEeiSMxCfefYakv0=";
}).outPath;
propagatedBuildInputs = [ lpeg ];
};
knownRockspec = (fetchurl {
url = "mirror://luarocks/luajson-1.3.4-1.rockspec";
hash = "sha256-+S4gfa6QaOMmOCDX8TxBq3kFWlbaEeiSMxCfefYakv0=";
}).outPath;
propagatedBuildInputs = [ lpeg ];
})
htmlparser = buildLuarocksPackage rec {
pname = "htmlparser"; #< name of the rockspec, not the repo
version = "0.3.9-1";
src = fetchFromGitHub {
owner = "msva";
repo = "lua-htmlparser";
# the rockspec was added to the repo *after* v0.3.9 was tagged
rev = "5ce9a775a345cf458c0388d7288e246bb1b82bff";
hash = "sha256-aSTLSfqz/MIDFVRwtBlDNBUhPb7KqOl32/Y62Hdec1s=";
};
knownRockspec = "${src}/rockspecs/${pname}-${version}.rockspec";
};
lua-spore = buildLuarocksPackage rec {
pname = "lua-spore"; #< name of the rockspec, not the repo
version = "0.3.3-1";
src = fetchFromGitLab {
domain = "framagit.org";
owner = "fperrad";
repo = "lua-Spore";
rev = "0.3.3";
hash = "sha256-wb7ykJsndoq0DazHpfXieUcBBptowYqD/eTTN/EK/6g=";
};
knownRockspec = "${src}/rockspec/${pname}-${version}.rockspec";
propagatedBuildInputs = [
luajson
luasocket
];
};
} // luaPkgs;
in ps;
luaEnv = luajit52.withPackages (ps: with (overlayedLuaPkgs ps); [
luajson
htmlparser
lua-spore
lpeg
luasec
luasocket
rapidjson
]);
rockspecFor = luaPkgName: let
pkg = luaEnv.pkgs."${luaPkgName}";
pkg = (overlayedLuaPkgs luaEnv.pkgs)."${luaPkgName}";
in
"${luaEnv}/${pkg.rocksSubdir}/${luaPkgName}/${pkg.rockspecVersion}/${luaPkgName}-${pkg.rockspecVersion}.rockspec";
crossTargets = {
@ -238,9 +275,11 @@ let
LUAJIT_LIB="${lib.getLib luaEnv}/lib/libluajit-5.1.so" \
LUASEC="${luaEnv}/share/lua/5.1/ssl/" \
LUASOCKET="${luaEnv}/share/lua/5.1/socket/" \
LUA_HTMLPARSER_ROCK="${rockspecFor "htmlparser"}" \
LUA_INCDIR="${lib.getDev luaEnv}/include" \
LUA_LIBDIR="${lib.getLib luaEnv}/lib/libluajit-5.1.so" \
LUA_RAPIDJSON_ROCK="${rockspecFor "rapidjson"}" \
LUA_SPORE_ROCK="${rockspecFor "lua-spore"}" \
OPENSSL_LIB="${lib.getLib openssl}/lib/libssl.so" \
OPENSSL_DIR="${opensslAll}" \
SSL_LIB="${lib.getLib openssl}/lib/libssl.so.3" \
@ -323,8 +362,8 @@ stdenv.mkDerivation rec {
patches = [
./debug.patch #< not needed to build, just helps debug packaging issues
./no_rm_build_dirs.patch
./lua-Spore-no-luajson.patch #< TODO: test this at runtime! we ship luajson, but just don't expose it via luarocks
# ./no_rm_build_dirs.patch
# ./lua-Spore-no-luajson.patch #< TODO: probably not needed now that lua-spore is a nixpkgs lua package
./rss-no-interrupt-on-image-failure.patch # just a preference
];
@ -359,6 +398,16 @@ stdenv.mkDerivation rec {
--replace-quiet 'ffi.load("libs/' 'ffi.load("'
done
# don't force-rebuild third-party components, else we can't replace them with our own
# substituteInPlace base/Makefile.third \
# --replace-fail '-rm -rf $(MUPDF_BUILD_DIR)' "" \
# --replace-fail '-rm -rf $(LUASOCKET) $(LUASOCKET_BUILD_DIR)' "" \
# --replace-fail '-rm -f $(LUA_SPORE_DIR)/../lua-Spore-stamp/lua-Spore-build' "" \
# --replace-fail '-rm -f $(LUA_SPORE_ROCK)' "" \
# --replace-fail '-rm -f $(LUA_HTMLPARSER_ROCK)' ""
substituteInPlace base/Makefile.third \
--replace-fail ' -rm ' ' # -rm'
# lots of places in Makefile.third (incorrectly) assume lib paths are relative to CURDIR,
# so link /nix into CURDIR to allow them to work anyway
ln -s /nix base/nix
@ -476,7 +525,12 @@ stdenv.mkDerivation rec {
passthru = {
# exposed for debugging
inherit luajit52 luaEnv;
inherit luajit52 luaEnv rockspecFor;
inherit (overlayedLuaPkgs luaEnv.pkgs)
luajson
htmlparser
lua-spore
;
};
meta = with lib; {

View File

@ -180,12 +180,12 @@ in
source.hash = "sha256-ApOHUgU6X1rHwyjAHA/0Nt+buDFqY2ttXEnEvdrRl3A=";
# package: not in nixpkgs, except in source-only form (mujoco.pin.lodepng)
};
lua-htmlparser = {
source.url = "https://github.com/msva/lua-htmlparser";
source.rev = "5ce9a775a345cf458c0388d7288e246bb1b82bff";
source.hash = "sha256-aSTLSfqz/MIDFVRwtBlDNBUhPb7KqOl32/Y62Hdec1s=";
# package: not in nixpkgs
};
# lua-htmlparser = {
# source.url = "https://github.com/msva/lua-htmlparser";
# source.rev = "5ce9a775a345cf458c0388d7288e246bb1b82bff";
# source.hash = "sha256-aSTLSfqz/MIDFVRwtBlDNBUhPb7KqOl32/Y62Hdec1s=";
# # package: not in nixpkgs
# };
# luajit = {
# source.url = "https://github.com/LuaJIT/LuaJIT";
# source.rev = "29b0b282f59ac533313199f4f7be79490b7eee51";
@ -210,17 +210,17 @@ in
# source.hash = "sha256-Y35QYNLznQmErr6rIjxLzw0/6Y7y8TbzD4yaEdgEljA=";
# # package: TODO: packaged in nix as a luarocks package
# };
lua-Spore = {
# Complete... ish?
# this originally failed like so:
# Missing dependencies for lua-spore 0.3.1-1:
# luajson >= 1.3 (not installed)
# it passes now only because we patch out its build-time check for luajson (which we DO provide at runtime)
source.url = "https://framagit.org/fperrad/lua-Spore";
source.rev = "tags/0.3.3";
source.hash = "sha256-wb7ykJsndoq0DazHpfXieUcBBptowYqD/eTTN/EK/6g=";
# package: not in nixpkgs
};
# lua-Spore = {
# # Complete... ish?
# # this originally failed like so:
# # Missing dependencies for lua-spore 0.3.1-1:
# # luajson >= 1.3 (not installed)
# # it passes now only because we patch out its build-time check for luajson (which we DO provide at runtime)
# source.url = "https://framagit.org/fperrad/lua-Spore";
# source.rev = "tags/0.3.3";
# source.hash = "sha256-wb7ykJsndoq0DazHpfXieUcBBptowYqD/eTTN/EK/6g=";
# # package: not in nixpkgs
# };
lunasvg = {
source.url = "https://github.com/sammycage/lunasvg.git";
source.rev = "59d6f6ba835c1b7c7a0f9d4ea540ec3981777885";