Merge #298548: staging-next 2024-03-24

This commit is contained in:
Vladimír Čunát 2024-04-01 22:49:19 +02:00
commit 5476cea489
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
163 changed files with 5752 additions and 3383 deletions

1
.github/labeler.yml vendored
View File

@ -122,6 +122,7 @@
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/tools/misc/luarocks/*
- pkgs/development/interpreters/lua-5/**/*
- pkgs/development/interpreters/luajit/**/*
- pkgs/development/lua-modules/**/*

View File

@ -17,6 +17,9 @@ The main package set contains aliases to these package sets, e.g.
`luaPackages` refers to `lua5_1.pkgs` and `lua52Packages` to
`lua5_2.pkgs`.
Note that nixpkgs patches the non-luajit interpreters to avoid referring to
`/usr` and have `;;` (a [placeholder](https://www.lua.org/manual/5.1/manual.html#pdf-package.path) replaced with the default LUA_PATH) work correctly.
### Installing Lua and packages {#installing-lua-and-packages}
#### Lua environment defined in separate `.nix` file {#lua-environment-defined-in-separate-.nix-file}

View File

@ -63,6 +63,9 @@ Use `services.pipewire.extraConfig` or `services.pipewire.configPackages` for Pi
}
```
- lua interpreters default LUA_PATH and LUA_CPATH are not overriden by nixpkgs
anymore, we patch LUA_ROOT instead which is more respectful to upstream.
- Plasma 6 is now available and can be installed with `services.xserver.desktopManager.plasma6.enable = true;`. Plasma 5 will likely be deprecated in the next release (24.11). Note that Plasma 6 runs as Wayland by default, and the X11 session needs to be explicitly selected if necessary.
## New Services {#sec-release-24.05-new-services}

View File

@ -34,10 +34,10 @@
elpaBuild {
pname = "activities";
ename = "activities";
version = "0.5.1";
version = "0.7";
src = fetchurl {
url = "https://elpa.gnu.org/packages/activities-0.5.1.tar";
sha256 = "0ng9sgajcpal881s3kavkmz0fc38f2h207hpqj62cf14z7bsk0zk";
url = "https://elpa.gnu.org/packages/activities-0.7.tar";
sha256 = "17vwbblcwayf1lqfvc64s606cyv1pyh094i3d8fz0k5ivgfp6ybi";
};
packageRequires = [ emacs persist ];
meta = {
@ -261,6 +261,21 @@
license = lib.licenses.free;
};
}) {};
assess = callPackage ({ elpaBuild, emacs, fetchurl, lib, m-buffer }:
elpaBuild {
pname = "assess";
ename = "assess";
version = "0.7";
src = fetchurl {
url = "https://elpa.gnu.org/packages/assess-0.7.tar";
sha256 = "0ixs6ab5j12q69bn9h423a6c7mpc7r5spf6m039x3rl14yc04cy4";
};
packageRequires = [ emacs m-buffer ];
meta = {
homepage = "https://elpa.gnu.org/packages/assess.html";
license = lib.licenses.free;
};
}) {};
async = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "async";
@ -280,10 +295,10 @@
elpaBuild {
pname = "auctex";
ename = "auctex";
version = "14.0.3";
version = "14.0.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/auctex-14.0.3.tar";
sha256 = "1xk29nk3r7ilxk2vag3diacamqvlws7mbjk5a0iivz5y6fy7hmjc";
url = "https://elpa.gnu.org/packages/auctex-14.0.4.tar";
sha256 = "03w6qs4f0ksb8f54zsx189775w3wdyfaqg3dwn20a77y5cvisk52";
};
packageRequires = [ emacs ];
meta = {
@ -550,10 +565,10 @@
elpaBuild {
pname = "brief";
ename = "brief";
version = "5.88.22.2";
version = "5.90";
src = fetchurl {
url = "https://elpa.gnu.org/packages/brief-5.88.22.2.tar";
sha256 = "1i4sdm8kcrazzp22gb4hi1gd4lfq6hdh6pnldmi1zjjyhl1gbzn3";
url = "https://elpa.gnu.org/packages/brief-5.90.tar";
sha256 = "18v0qf3aj14sh6njrrjdahzaghsqy50hdjrwl3k1m7x2jqvzxd1z";
};
packageRequires = [ cl-lib nadvice ];
meta = {
@ -565,10 +580,10 @@
elpaBuild {
pname = "buffer-env";
ename = "buffer-env";
version = "0.5";
version = "0.6";
src = fetchurl {
url = "https://elpa.gnu.org/packages/buffer-env-0.5.tar";
sha256 = "17q0flxp0rp52ksyh5ijcamvvm003icbyzv28r6vknrw3qsphb3p";
url = "https://elpa.gnu.org/packages/buffer-env-0.6.tar";
sha256 = "08li070s2s64lifgzns0z6xjk1qyaik56d6sbdp3gsyghc1sx7rn";
};
packageRequires = [ compat emacs ];
meta = {
@ -659,10 +674,10 @@
elpaBuild {
pname = "cape";
ename = "cape";
version = "1.3";
version = "1.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/cape-1.3.tar";
sha256 = "1178f6js821zcmsc3zrlclnaf4sswgvzs2qazzi975dkcfqcn3vq";
url = "https://elpa.gnu.org/packages/cape-1.4.tar";
sha256 = "1y0b0lx6qb27x3d0yn3gxykfir07cw4w5jkkw3ff8x1ak6wrf4zv";
};
packageRequires = [ compat emacs ];
meta = {
@ -809,10 +824,10 @@
elpaBuild {
pname = "comint-mime";
ename = "comint-mime";
version = "0.3";
version = "0.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/comint-mime-0.3.tar";
sha256 = "0dlzwzmiwq9z8riq6h1gpq1g713x09kxgaz2m4anxkbmgb95r7hf";
url = "https://elpa.gnu.org/packages/comint-mime-0.4.tar";
sha256 = "1wgr1dq3qdnsvziylcqaiwhjafdqph4jrnq4cp0lcr1j796vp1dz";
};
packageRequires = [ emacs ];
meta = {
@ -907,10 +922,10 @@
elpaBuild {
pname = "compat";
ename = "compat";
version = "29.1.4.4";
version = "29.1.4.5";
src = fetchurl {
url = "https://elpa.gnu.org/packages/compat-29.1.4.4.tar";
sha256 = "0710g552b1nznnfx2774gmg6yizs27s0bakqm95nsjrp6kgznbfr";
url = "https://elpa.gnu.org/packages/compat-29.1.4.5.tar";
sha256 = "191cjzrw9xm5bvcf8s1yr9hdcn9i02789xfd8pz33lk65s0rq413";
};
packageRequires = [ emacs seq ];
meta = {
@ -922,10 +937,10 @@
elpaBuild {
pname = "consult";
ename = "consult";
version = "1.3";
version = "1.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/consult-1.3.tar";
sha256 = "1qyqvc4rp0287lidpzhvi669ygjnqmlw8wq0hc0nks2703p283c8";
url = "https://elpa.gnu.org/packages/consult-1.4.tar";
sha256 = "1vxc9i4jwnq4q8svgqjzn6nqqjzh3b6gp81iyfcr5n2122y0aq1y";
};
packageRequires = [ compat emacs ];
meta = {
@ -933,8 +948,7 @@
license = lib.licenses.free;
};
}) {};
consult-hoogle = callPackage ({ consult
, elpaBuild
consult-hoogle = callPackage ({ elpaBuild
, emacs
, fetchurl
, haskell-mode
@ -942,12 +956,12 @@
elpaBuild {
pname = "consult-hoogle";
ename = "consult-hoogle";
version = "0.1.1";
version = "0.2.0";
src = fetchurl {
url = "https://elpa.gnu.org/packages/consult-hoogle-0.1.1.tar";
sha256 = "1bcl7h5ykcgrsfj27wkv9l9jvbj2bbkh0w9d60663m1bkp0p3y2r";
url = "https://elpa.gnu.org/packages/consult-hoogle-0.2.0.tar";
sha256 = "1wzd7i7sfd1l8fkfgfaj5vyc9nx9aycfr4yp5yxg1mr6fz8m2rmz";
};
packageRequires = [ consult emacs haskell-mode ];
packageRequires = [ emacs haskell-mode ];
meta = {
homepage = "https://elpa.gnu.org/packages/consult-hoogle.html";
license = lib.licenses.free;
@ -1152,10 +1166,10 @@
elpaBuild {
pname = "dape";
ename = "dape";
version = "0.7.0";
version = "0.9.0";
src = fetchurl {
url = "https://elpa.gnu.org/packages/dape-0.7.0.tar";
sha256 = "0fbafwmrs9dlv875vcg1c9gh0hqs1zpnyqxgkdvbrazww7ffn60g";
url = "https://elpa.gnu.org/packages/dape-0.9.0.tar";
sha256 = "13xvl24l8lr64ndc8rk1dxdgsbvwxhn90844xkdzl7qs8i3hyw1l";
};
packageRequires = [ emacs jsonrpc ];
meta = {
@ -1242,10 +1256,10 @@
elpaBuild {
pname = "denote";
ename = "denote";
version = "2.2.4";
version = "2.3.0";
src = fetchurl {
url = "https://elpa.gnu.org/packages/denote-2.2.4.tar";
sha256 = "0a0f4s715nfb7kly82m1gb2ady69z089wlay5i53n9bxzi61x3j7";
url = "https://elpa.gnu.org/packages/denote-2.3.0.tar";
sha256 = "0h6pdn9w1ggyrmfniqvy307wnlf49n05asa2z5wqxvj6mnvjza1y";
};
packageRequires = [ emacs ];
meta = {
@ -1287,10 +1301,10 @@
elpaBuild {
pname = "devdocs";
ename = "devdocs";
version = "0.5";
version = "0.6";
src = fetchurl {
url = "https://elpa.gnu.org/packages/devdocs-0.5.tar";
sha256 = "0qyp8lhf76yv2ym7cryvygvf2m9jah5nsl1g79gqjrsin6vlhqka";
url = "https://elpa.gnu.org/packages/devdocs-0.6.tar";
sha256 = "17av2l61mr4y8la4cqiq1dnaznni4xirr5k3wdix1jzl3q1apypy";
};
packageRequires = [ emacs ];
meta = {
@ -1653,10 +1667,10 @@
elpaBuild {
pname = "eev";
ename = "eev";
version = "20240205";
version = "20240309";
src = fetchurl {
url = "https://elpa.gnu.org/packages/eev-20240205.tar";
sha256 = "06psmcf3yi7pincsbhjrcrml0wzwgmlv6xy2fbpg1sg8vlibbgi3";
url = "https://elpa.gnu.org/packages/eev-20240309.tar";
sha256 = "0j9hz5raxrk3d2ashbsp9yvi04d5ap0chb4lpljr4pbh2lnyjr4h";
};
packageRequires = [ emacs ];
meta = {
@ -1668,10 +1682,10 @@
elpaBuild {
pname = "ef-themes";
ename = "ef-themes";
version = "1.5.1";
version = "1.6.1";
src = fetchurl {
url = "https://elpa.gnu.org/packages/ef-themes-1.5.1.tar";
sha256 = "00qh5b7kx0dlms7drnzj95mvgwfzg5h5m9prkbr8qi4ssx939gdw";
url = "https://elpa.gnu.org/packages/ef-themes-1.6.1.tar";
sha256 = "1ms0rqivxdsbx7jv6d5h1khvm4ghml152ab831chg4z77apmq1ga";
};
packageRequires = [ emacs ];
meta = {
@ -1778,22 +1792,16 @@
license = lib.licenses.free;
};
}) {};
ellama = callPackage ({ dash
, elpaBuild
, emacs
, fetchurl
, lib
, llm
, spinner }:
ellama = callPackage ({ elpaBuild, emacs, fetchurl, lib, llm, spinner }:
elpaBuild {
pname = "ellama";
ename = "ellama";
version = "0.8.7";
version = "0.8.13";
src = fetchurl {
url = "https://elpa.gnu.org/packages/ellama-0.8.7.tar";
sha256 = "0qmd7zrh026rjic26bdp9zinb7vkppdm14inwpwaashqxa5brwi5";
url = "https://elpa.gnu.org/packages/ellama-0.8.13.tar";
sha256 = "012j3rnvwj8ajyjdlgdx6nrs773i71dyl5brs0jgx010jibzmafi";
};
packageRequires = [ dash emacs llm spinner ];
packageRequires = [ emacs llm spinner ];
meta = {
homepage = "https://elpa.gnu.org/packages/ellama.html";
license = lib.licenses.free;
@ -1893,10 +1901,10 @@
elpaBuild {
pname = "emms";
ename = "emms";
version = "18";
version = "19";
src = fetchurl {
url = "https://elpa.gnu.org/packages/emms-18.tar";
sha256 = "1jslk37kx7yzvwy4hq1a6b71kp4a3bgfzzp8bpplv7z6vcmwrmgq";
url = "https://elpa.gnu.org/packages/emms-19.tar";
sha256 = "13c884s92ddn52psgkaz3zvb94g23gq41dbidpx7x4gzdhd9qqxm";
};
packageRequires = [ cl-lib nadvice seq ];
meta = {
@ -2125,10 +2133,10 @@
elpaBuild {
pname = "filechooser";
ename = "filechooser";
version = "0.1.2";
version = "0.2.0";
src = fetchurl {
url = "https://elpa.gnu.org/packages/filechooser-0.1.2.tar";
sha256 = "0s0mdc851zd2hy8hfpbamiimbh7c788cyz8mxnwzkpmf6jlj6xdw";
url = "https://elpa.gnu.org/packages/filechooser-0.2.0.tar";
sha256 = "1pl6n6d6gymdm0gx0nz96hwps8v1s2zpqph41d0h5hdvsvxacx6w";
};
packageRequires = [ compat emacs ];
meta = {
@ -2554,10 +2562,10 @@
elpaBuild {
pname = "greader";
ename = "greader";
version = "0.9.7";
version = "0.9.19";
src = fetchurl {
url = "https://elpa.gnu.org/packages/greader-0.9.7.tar";
sha256 = "08q2qfcwyxrnmjbzblgk16xhshhn2314swjs0kr5jrdijdgpfghh";
url = "https://elpa.gnu.org/packages/greader-0.9.19.tar";
sha256 = "1d04d1shzb505qs2mf7387dvl56pwlwh4b349s5fq2prwqrq71l7";
};
packageRequires = [ emacs ];
meta = {
@ -2584,10 +2592,10 @@
elpaBuild {
pname = "gtags-mode";
ename = "gtags-mode";
version = "1.0";
version = "1.1";
src = fetchurl {
url = "https://elpa.gnu.org/packages/gtags-mode-1.0.tar";
sha256 = "0nyzsr3fnds931ihw2dp5xlgv151kzph7qv1n751r1cajimzlp7n";
url = "https://elpa.gnu.org/packages/gtags-mode-1.1.tar";
sha256 = "0fgs6iqrivmyxfkjl6hxxs3zfjkkdas61z34q08qfjgw0ixz188h";
};
packageRequires = [ emacs ];
meta = {
@ -2726,10 +2734,10 @@
elpaBuild {
pname = "hyperbole";
ename = "hyperbole";
version = "9.0.0";
version = "9.0.1";
src = fetchurl {
url = "https://elpa.gnu.org/packages/hyperbole-9.0.0.tar";
sha256 = "07kpyp3ggf4knakn18niy819l184apx4d9vbcwv57j8zyqgn4c3l";
url = "https://elpa.gnu.org/packages/hyperbole-9.0.1.tar";
sha256 = "0a7py2dvszh0rf2smbmm8msjrc8vbbvlqnsqw0m2l12v8vllmxnb";
};
packageRequires = [ emacs ];
meta = {
@ -2786,10 +2794,10 @@
elpaBuild {
pname = "isearch-mb";
ename = "isearch-mb";
version = "0.7";
version = "0.8";
src = fetchurl {
url = "https://elpa.gnu.org/packages/isearch-mb-0.7.tar";
sha256 = "1dfjh4ya9515vx0q2dv1brddw350gxd40h1g1vsa783ivvm0hm75";
url = "https://elpa.gnu.org/packages/isearch-mb-0.8.tar";
sha256 = "06241rwz01z4ysgmizczq12zl0cc6xvfyds48glzk1jp82zp4adp";
};
packageRequires = [ emacs ];
meta = {
@ -2956,10 +2964,10 @@
elpaBuild {
pname = "jinx";
ename = "jinx";
version = "1.3";
version = "1.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/jinx-1.3.tar";
sha256 = "0xlfw1sw92qf8bwpw9qnjhkz4ax6n7kcl72ypqm3swmj92jbgsg7";
url = "https://elpa.gnu.org/packages/jinx-1.4.tar";
sha256 = "1vv85pbhcpwjvd3iwnr8ksjpbydrsk7m3zm34hcbybg703yk2nl7";
};
packageRequires = [ compat emacs ];
meta = {
@ -2971,10 +2979,10 @@
elpaBuild {
pname = "jit-spell";
ename = "jit-spell";
version = "0.3";
version = "0.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/jit-spell-0.3.tar";
sha256 = "0q8wd9phd0zcjhc92j633vz82fr0ji8zc9vir7kcn1msrf6jspwz";
url = "https://elpa.gnu.org/packages/jit-spell-0.4.tar";
sha256 = "1p83spcq52l7k63p56y3w5r3kl49wbrs4abynwn25ikhkd4wl8x3";
};
packageRequires = [ compat emacs ];
meta = {
@ -3016,10 +3024,10 @@
elpaBuild {
pname = "jsonrpc";
ename = "jsonrpc";
version = "1.0.24";
version = "1.0.25";
src = fetchurl {
url = "https://elpa.gnu.org/packages/jsonrpc-1.0.24.tar";
sha256 = "05nwxfybczxx7pmflq762dq3wypm3pmcfljqs5kh81icxvdqvk8s";
url = "https://elpa.gnu.org/packages/jsonrpc-1.0.25.tar";
sha256 = "0hlc70xlm3a53il7k24s6s25dhnd09l2454r5qkpfnjdz9p5ih6f";
};
packageRequires = [ emacs ];
meta = {
@ -3137,6 +3145,40 @@
license = lib.licenses.free;
};
}) {};
lentic = callPackage ({ dash, elpaBuild, emacs, fetchurl, lib, m-buffer }:
elpaBuild {
pname = "lentic";
ename = "lentic";
version = "0.12";
src = fetchurl {
url = "https://elpa.gnu.org/packages/lentic-0.12.tar";
sha256 = "15sb126sq5aw3n09vqydmsl1l5svfar70iz42hnqi783cpw1lh0m";
};
packageRequires = [ dash emacs m-buffer ];
meta = {
homepage = "https://elpa.gnu.org/packages/lentic.html";
license = lib.licenses.free;
};
}) {};
lentic-server = callPackage ({ elpaBuild
, fetchurl
, lentic
, lib
, web-server }:
elpaBuild {
pname = "lentic-server";
ename = "lentic-server";
version = "0.2";
src = fetchurl {
url = "https://elpa.gnu.org/packages/lentic-server-0.2.tar";
sha256 = "1vifs91r4rm57rka8by50f8zg5pr2hjqwbdz28mbbxhkj3war6s5";
};
packageRequires = [ lentic web-server ];
meta = {
homepage = "https://elpa.gnu.org/packages/lentic-server.html";
license = lib.licenses.free;
};
}) {};
let-alist = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "let-alist";
@ -3182,14 +3224,36 @@
license = lib.licenses.free;
};
}) {};
listen = callPackage ({ elpaBuild
, emacs
, fetchurl
, lib
, persist
, taxy
, taxy-magit-section
, transient }:
elpaBuild {
pname = "listen";
ename = "listen";
version = "0.8";
src = fetchurl {
url = "https://elpa.gnu.org/packages/listen-0.8.tar";
sha256 = "1vj9fsyp5v1qh87asj23k625080x6c8mgkas4933lrz7l2g7h1y2";
};
packageRequires = [ emacs persist taxy taxy-magit-section transient ];
meta = {
homepage = "https://elpa.gnu.org/packages/listen.html";
license = lib.licenses.free;
};
}) {};
llm = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "llm";
ename = "llm";
version = "0.9.1";
version = "0.12.1";
src = fetchurl {
url = "https://elpa.gnu.org/packages/llm-0.9.1.tar";
sha256 = "0vib0zl41fsacc5d79f1l52j2vxnbqc37471b86cxw9rha0clr8m";
url = "https://elpa.gnu.org/packages/llm-0.12.1.tar";
sha256 = "11z56fqp0y13jmvm2611xyqsz41k01rsqdjvrzvbf33n56vsw713";
};
packageRequires = [ emacs ];
meta = {
@ -3317,6 +3381,21 @@
license = lib.licenses.free;
};
}) {};
m-buffer = callPackage ({ elpaBuild, fetchurl, lib, seq }:
elpaBuild {
pname = "m-buffer";
ename = "m-buffer";
version = "0.16";
src = fetchurl {
url = "https://elpa.gnu.org/packages/m-buffer-0.16.tar";
sha256 = "1mb03hrszxxsk61yvh70rnkn7iiwx1vx6n1br02clkpn2q2c0mq5";
};
packageRequires = [ seq ];
meta = {
homepage = "https://elpa.gnu.org/packages/m-buffer.html";
license = lib.licenses.free;
};
}) {};
map = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "map";
@ -3516,10 +3595,10 @@
elpaBuild {
pname = "modus-themes";
ename = "modus-themes";
version = "4.3.0";
version = "4.4.0";
src = fetchurl {
url = "https://elpa.gnu.org/packages/modus-themes-4.3.0.tar";
sha256 = "0zsglzqc36bw9r7fgvxjdcrdjar6xwad29kwyqd2k36bq3pivzq3";
url = "https://elpa.gnu.org/packages/modus-themes-4.4.0.tar";
sha256 = "1n6fmgj2kpdy2mmwg5hh6dic30zy0gd3ap6hlipl9qn08lawbbgq";
};
packageRequires = [ emacs ];
meta = {
@ -3527,6 +3606,21 @@
license = lib.licenses.free;
};
}) {};
mpdired = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "mpdired";
ename = "mpdired";
version = "1";
src = fetchurl {
url = "https://elpa.gnu.org/packages/mpdired-1.tar";
sha256 = "1b7xsdgsrwy7qkshkk83bizz9r78g4pdfnavwl6riyb947gk6zkx";
};
packageRequires = [ emacs ];
meta = {
homepage = "https://elpa.gnu.org/packages/mpdired.html";
license = lib.licenses.free;
};
}) {};
multi-mode = callPackage ({ elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "multi-mode";
@ -3900,10 +3994,10 @@
elpaBuild {
pname = "orderless";
ename = "orderless";
version = "1.0";
version = "1.1";
src = fetchurl {
url = "https://elpa.gnu.org/packages/orderless-1.0.tar";
sha256 = "0kslgrs857h3mm837hcb8v52ankbv0hm2pz0q136imckzj32m43s";
url = "https://elpa.gnu.org/packages/orderless-1.1.tar";
sha256 = "19iy0ps8h1qjh16mdybayd9i25bn27sa2slqsa6nslh251pxc0rk";
};
packageRequires = [ emacs ];
meta = {
@ -3915,10 +4009,10 @@
elpaBuild {
pname = "org";
ename = "org";
version = "9.6.19";
version = "9.6.23";
src = fetchurl {
url = "https://elpa.gnu.org/packages/org-9.6.19.tar";
sha256 = "0ibgw0i7nsn589k0ynifwdp1f3ia6p8369myhjqgmwy392cwrcxg";
url = "https://elpa.gnu.org/packages/org-9.6.23.tar";
sha256 = "0yqn3kag4anzm8ahfgjxrxjndzq6rbs6kayfq93gx4rn0qxa334q";
};
packageRequires = [ emacs ];
meta = {
@ -3975,10 +4069,10 @@
elpaBuild {
pname = "org-modern";
ename = "org-modern";
version = "1.1";
version = "1.2";
src = fetchurl {
url = "https://elpa.gnu.org/packages/org-modern-1.1.tar";
sha256 = "1aclips7y3dasjh6rjdcx1b6fkaripjam6120b7wm487qpjcrzc8";
url = "https://elpa.gnu.org/packages/org-modern-1.2.tar";
sha256 = "1kgvrsmbgadbr7wk48sgx1prlgpbp31nih9bl9div35d496njcnw";
};
packageRequires = [ compat emacs ];
meta = {
@ -4376,6 +4470,21 @@
license = lib.licenses.free;
};
}) {};
pq = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "pq";
ename = "pq";
version = "0.2";
src = fetchurl {
url = "https://elpa.gnu.org/packages/pq-0.2.tar";
sha256 = "0gy3i2l1fxwpav6l57yf3mml15lhwh9xp8sm40hlpgyn15nyz4c6";
};
packageRequires = [ emacs ];
meta = {
homepage = "https://elpa.gnu.org/packages/pq.html";
license = lib.licenses.free;
};
}) {};
project = callPackage ({ elpaBuild, emacs, fetchurl, lib, xref }:
elpaBuild {
pname = "project";
@ -4575,10 +4684,10 @@
elpaBuild {
pname = "rcirc-sqlite";
ename = "rcirc-sqlite";
version = "0.1.3";
version = "0.1.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/rcirc-sqlite-0.1.3.tar";
sha256 = "1pwxkw6dzwbg5g3rxilpp6iy3mzxgpn0mw59i3dcx25hdyizqhip";
url = "https://elpa.gnu.org/packages/rcirc-sqlite-0.1.4.tar";
sha256 = "0hz0nm35jq6fg9pr4j725r2awxbf1q23bzn85nhcbpafzb8mmajl";
};
packageRequires = [ emacs ];
meta = {
@ -4845,10 +4954,10 @@
elpaBuild {
pname = "rt-liberation";
ename = "rt-liberation";
version = "6";
version = "7";
src = fetchurl {
url = "https://elpa.gnu.org/packages/rt-liberation-6.tar";
sha256 = "1l87q2h1hqm5zpg1fz835gmbf5fgl9fvcqg42c17v6kim4has8zd";
url = "https://elpa.gnu.org/packages/rt-liberation-7.tar";
sha256 = "0gb1an3a68ib27jrc8x8grq5z3xya4b1gl8ii82a1clzf87n7k63";
};
packageRequires = [];
meta = {
@ -5215,10 +5324,10 @@
elpaBuild {
pname = "spacious-padding";
ename = "spacious-padding";
version = "0.3.0";
version = "0.4.1";
src = fetchurl {
url = "https://elpa.gnu.org/packages/spacious-padding-0.3.0.tar";
sha256 = "1iiaxgl18k8hkwwyz3qnargv6q8kwzyh39ai46k5xbpmyrsj4b16";
url = "https://elpa.gnu.org/packages/spacious-padding-0.4.1.tar";
sha256 = "02bc0r20b4mgnlzryq26q0jq45wfgpvv7y3zhvnaaqj11rw7779f";
};
packageRequires = [ emacs ];
meta = {
@ -5689,10 +5798,10 @@
elpaBuild {
pname = "tramp";
ename = "tramp";
version = "2.6.2.1";
version = "2.6.2.2";
src = fetchurl {
url = "https://elpa.gnu.org/packages/tramp-2.6.2.1.tar";
sha256 = "145riknpdvw7rvpz20m766yci3w012f241mw38pbbb9cb8pn2rbf";
url = "https://elpa.gnu.org/packages/tramp-2.6.2.2.tar";
sha256 = "0bbsff2qr71f70nxhdi19b3jzpv6bgfb7x7qkrccsygvsvgyrb2h";
};
packageRequires = [ emacs ];
meta = {
@ -5749,10 +5858,10 @@
elpaBuild {
pname = "transient";
ename = "transient";
version = "0.5.3";
version = "0.6.0";
src = fetchurl {
url = "https://elpa.gnu.org/packages/transient-0.5.3.tar";
sha256 = "12ak6rykg627rkwwiga5d9g9pzcrq2sliynqbr3lm8rvlwbdhkhx";
url = "https://elpa.gnu.org/packages/transient-0.6.0.tar";
sha256 = "1lsh8cvg1kspa8gl9fml0x7r61fbhjajmjqjf4r2s7qz102z66xb";
};
packageRequires = [ compat emacs seq ];
meta = {
@ -5899,10 +6008,10 @@
elpaBuild {
pname = "urgrep";
ename = "urgrep";
version = "0.4.0";
version = "0.4.1";
src = fetchurl {
url = "https://elpa.gnu.org/packages/urgrep-0.4.0.tar";
sha256 = "0l0gswml6hkna48gfljj3hajhcx3bbc1rqwb2v01hvqab05an7zs";
url = "https://elpa.gnu.org/packages/urgrep-0.4.1.tar";
sha256 = "1kwcb7xxk9lcby5s8gpd5dchya7qq063j217rxsjyn8vv9z91lfc";
};
packageRequires = [ compat emacs project ];
meta = {
@ -6106,10 +6215,10 @@
elpaBuild {
pname = "verilog-mode";
ename = "verilog-mode";
version = "2023.6.6.141322628";
version = "2024.3.1.121933719";
src = fetchurl {
url = "https://elpa.gnu.org/packages/verilog-mode-2023.6.6.141322628.tar";
sha256 = "14qls4v5yxrgyiimvvggimw5ddlx0ll387a1r6awm274rj4p3d19";
url = "https://elpa.gnu.org/packages/verilog-mode-2024.3.1.121933719.tar";
sha256 = "047kna2j1mbsibw1psxdp8qmg91dnjrdrskdzhys9pmaqggfl5ry";
};
packageRequires = [];
meta = {

View File

@ -64,10 +64,10 @@
elpaBuild {
pname = "annotate";
ename = "annotate";
version = "2.1.0";
version = "2.2.0";
src = fetchurl {
url = "https://elpa.nongnu.org/nongnu/annotate-2.1.0.tar";
sha256 = "07q8s3qi3lm8g01ypvqqq0cn5jx5jrgyv74fbfam3mmz5l3mqp6q";
url = "https://elpa.nongnu.org/nongnu/annotate-2.2.0.tar";
sha256 = "1h1whavdrwfsc79kcvh2vbvjzqd7n01xzjb1acgyiy9wkyl79p7b";
};
packageRequires = [];
meta = {
@ -306,10 +306,10 @@
elpaBuild {
pname = "buttercup";
ename = "buttercup";
version = "1.33";
version = "1.34";
src = fetchurl {
url = "https://elpa.nongnu.org/nongnu/buttercup-1.33.tar";
sha256 = "0245fq4iny1jnm440dzkq0fadw10ncnhkj28mayqs9iyyzj9g5h4";
url = "https://elpa.nongnu.org/nongnu/buttercup-1.34.tar";
sha256 = "0bdlky9d5fzc9x9wpjxyvrclz1rmzsnvc89lf0m5fhyp4r8jvxy4";
};
packageRequires = [ emacs ];
meta = {
@ -459,6 +459,26 @@
license = lib.licenses.free;
};
}) {};
consult-flycheck = callPackage ({ consult
, elpaBuild
, emacs
, fetchurl
, flycheck
, lib }:
elpaBuild {
pname = "consult-flycheck";
ename = "consult-flycheck";
version = "1.0";
src = fetchurl {
url = "https://elpa.nongnu.org/nongnu/consult-flycheck-1.0.tar";
sha256 = "0901wliqdzj5dmam1kkbq0nxhywqf11182q7yxjxh98czy5w3xh8";
};
packageRequires = [ consult emacs flycheck ];
meta = {
homepage = "https://elpa.gnu.org/packages/consult-flycheck.html";
license = lib.licenses.free;
};
}) {};
corfu-terminal = callPackage ({ corfu
, elpaBuild
, emacs
@ -479,16 +499,16 @@
license = lib.licenses.free;
};
}) {};
crux = callPackage ({ elpaBuild, fetchurl, lib, seq }:
crux = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "crux";
ename = "crux";
version = "0.4.0";
version = "0.5.0";
src = fetchurl {
url = "https://elpa.nongnu.org/nongnu/crux-0.4.0.tar";
sha256 = "01yg54s2l3zr4h7h3nw408bqzrr4yds9rfgc575b76006v5d3ciy";
url = "https://elpa.nongnu.org/nongnu/crux-0.5.0.tar";
sha256 = "0zdzfglzvhkzyvnkk2d217c6f8gnbcxlp8adimwrxgqh7c6gwihp";
};
packageRequires = [ seq ];
packageRequires = [ emacs ];
meta = {
homepage = "https://elpa.gnu.org/packages/crux.html";
license = lib.licenses.free;
@ -742,10 +762,10 @@
elpaBuild {
pname = "elpher";
ename = "elpher";
version = "3.5.1";
version = "3.6.0";
src = fetchurl {
url = "https://elpa.nongnu.org/nongnu/elpher-3.5.1.tar";
sha256 = "0687npypihavghz9bjs8f6h10awjgjv5fdd11dmh43p1krhrga2w";
url = "https://elpa.nongnu.org/nongnu/elpher-3.6.0.tar";
sha256 = "0pa8y3zc768wdgp43546qvwr6ly2q9gznfrl6qmm90gkv5wrc5ln";
};
packageRequires = [ emacs ];
meta = {
@ -2682,10 +2702,10 @@
elpaBuild {
pname = "racket-mode";
ename = "racket-mode";
version = "1.0.20240219.135847";
version = "1.0.20240319.160226";
src = fetchurl {
url = "https://elpa.nongnu.org/nongnu/racket-mode-1.0.20240219.135847.tar";
sha256 = "06g1ci7kq8fxjh65qwwnh530xvvh6pr9ha52f7xmbjf56iifn1da";
url = "https://elpa.nongnu.org/nongnu/racket-mode-1.0.20240319.160226.tar";
sha256 = "1alqiagpkbxqi8nyrn1qzfx23fagpn1ml9hqpyj897jwf5f03zsh";
};
packageRequires = [ emacs ];
meta = {
@ -3382,10 +3402,10 @@
elpaBuild {
pname = "visual-fill-column";
ename = "visual-fill-column";
version = "2.6.0";
version = "2.6.2";
src = fetchurl {
url = "https://elpa.nongnu.org/nongnu/visual-fill-column-2.6.0.tar";
sha256 = "1gpjby6g9wq8p25q1a35hr56nfb4sbcdrf0bjxidh1diw5g5saw4";
url = "https://elpa.nongnu.org/nongnu/visual-fill-column-2.6.2.tar";
sha256 = "13z87xyzldllvga8iygb33qaqvrrc2qnc315zalvbmydw174cq1i";
};
packageRequires = [ emacs ];
meta = {
@ -3397,10 +3417,10 @@
elpaBuild {
pname = "web-mode";
ename = "web-mode";
version = "17.3.18";
version = "17.3.19";
src = fetchurl {
url = "https://elpa.nongnu.org/nongnu/web-mode-17.3.18.tar";
sha256 = "18ylzq12gsayp3cmd8qjdqsnyiymjd95ffqs3xcyva6sl8d41hmy";
url = "https://elpa.nongnu.org/nongnu/web-mode-17.3.19.tar";
sha256 = "1z33y7p1dilwpwydb9q14n55q48n80mynm7fjr7ih91wvk8zz5di";
};
packageRequires = [ emacs ];
meta = {
@ -3560,10 +3580,10 @@
elpaBuild {
pname = "xah-fly-keys";
ename = "xah-fly-keys";
version = "24.21.20240220095736";
version = "24.24.20240324101507";
src = fetchurl {
url = "https://elpa.nongnu.org/nongnu/xah-fly-keys-24.21.20240220095736.tar";
sha256 = "04ra1m9mwhz3zh0776gbzfn4kn0yxgbfbh1hq78r2zxggvpjfikv";
url = "https://elpa.nongnu.org/nongnu/xah-fly-keys-24.24.20240324101507.tar";
sha256 = "1lqrrs5j523q33vvs85j3dlnd56bmnzglfkc8jilv6yq44dmv7v7";
};
packageRequires = [ emacs ];
meta = {

View File

@ -98,10 +98,10 @@ in
emacs29 = import ./make-emacs.nix (mkArgs {
pname = "emacs";
version = "29.2";
version = "29.3";
variant = "mainline";
rev = "29.2";
hash = "sha256-qSQmQzVyEGSr4GAI6rqnEwBvhl09D2D8MNasHqZQPL8=";
rev = "29.3";
hash = "sha256-4yN81djeKb9Hlr6MvaDdXqf4XOl0oolXEYGqkA+KUO0=";
});
emacs28-macport = import ./make-emacs.nix (mkArgs {

View File

@ -10,7 +10,7 @@ neovimRequireCheckHook () {
# editorconfig-checker-disable
export HOME="$TMPDIR"
@nvimBinary@ -es --headless -n -u NONE -i NONE --clean -V1 \
--cmd "set rtp+=$out" \
--cmd "set rtp+=$out,${dependencies/ /,}" \
--cmd "lua require('$nvimRequireCheck')"
fi
}

View File

@ -670,6 +670,9 @@
hardhat-nvim = super.hardhat-nvim.overrideAttrs {
dependencies = with self; [ overseer-nvim plenary-nvim ];
doInstallCheck = true;
nvimRequireCheck = "hardhat";
};
harpoon = super.harpoon.overrideAttrs {

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, wrapQtAppsHook
@ -71,6 +72,12 @@ stdenv.mkDerivation rec {
patches = [
# Remove when merged https://github.com/dolphin-emu/dolphin/pull/12070
./find-minizip-ng.patch
# fix buidl w/ glibc-2.39
(fetchpatch {
url = "https://github.com/dolphin-emu/dolphin/commit/3da2e15e6b95f02f66df461e87c8b896e450fdab.patch";
hash = "sha256-+8yGF412wQUYbyEuYWd41pgOgEbhCaezexxcI5CNehc=";
})
];
strictDeps = true;

View File

@ -2,14 +2,28 @@
{ stdenv, lib, self, Agda, runCommand, makeWrapper, writeText, ghcWithPackages, nixosTests }:
with lib.strings;
let
inherit (lib)
attrValues
elem
filter
filterAttrs
isAttrs
isList
platforms
;
inherit (lib.strings)
concatMapStrings
concatMapStringsSep
optionalString
;
withPackages' = {
pkgs,
ghc ? ghcWithPackages (p: with p; [ ieee754 ])
}: let
pkgs' = if builtins.isList pkgs then pkgs else pkgs self;
pkgs' = if isList pkgs then pkgs else pkgs self;
library-file = writeText "libraries" ''
${(concatMapStringsSep "\n" (p: "${p}/${p.libraryFile}") pkgs')}
'';
@ -23,7 +37,7 @@ let
inherit withPackages;
tests = {
inherit (nixosTests) agda;
allPackages = withPackages (lib.filter self.lib.isUnbrokenAgdaPackage (lib.attrValues self));
allPackages = withPackages (filter self.lib.isUnbrokenAgdaPackage (attrValues self));
};
};
inherit (Agda) meta;
@ -35,7 +49,7 @@ let
ln -s ${Agda}/bin/agda-mode $out/bin/agda-mode
'';
withPackages = arg: if builtins.isAttrs arg then withPackages' arg else withPackages' { pkgs = arg; };
withPackages = arg: if isAttrs arg then withPackages' arg else withPackages' { pkgs = arg; };
extensions = [
"agda"
@ -62,7 +76,7 @@ let
, extraExtensions ? []
, ...
}: let
agdaWithArgs = withPackages (builtins.filter (p: p ? isAgdaDerivation) buildInputs);
agdaWithArgs = withPackages (filter (p: p ? isAgdaDerivation) buildInputs);
includePathArgs = concatMapStrings (path: "-i" + path + " ") (includePaths ++ [(dirOf everythingFile)]);
in
{
@ -91,13 +105,13 @@ let
# darwin, it seems that there is no standard such locale; luckily,
# the referenced issue doesn't seem to surface on darwin. Hence let's
# set this only on non-darwin.
LC_ALL = lib.optionalString (!stdenv.isDarwin) "C.UTF-8";
LC_ALL = optionalString (!stdenv.isDarwin) "C.UTF-8";
meta = if meta.broken or false then meta // { hydraPlatforms = lib.platforms.none; } else meta;
meta = if meta.broken or false then meta // { hydraPlatforms = platforms.none; } else meta;
# Retrieve all packages from the finished package set that have the current package as a dependency and build them
passthru.tests = with builtins;
lib.filterAttrs (name: pkg: self.lib.isUnbrokenAgdaPackage pkg && elem pname (map (pkg: pkg.pname) pkg.buildInputs)) self;
passthru.tests =
filterAttrs (name: pkg: self.lib.isUnbrokenAgdaPackage pkg && elem pname (map (pkg: pkg.pname) pkg.buildInputs)) self;
};
in
{

View File

@ -35,7 +35,7 @@
# Note: the hardening flags are part of the bintools-wrapper, rather than
# the cc-wrapper, because a few of them are handled by the linker.
, defaultHardeningFlags ? with stdenvNoCC; [
, defaultHardeningFlags ? [
"bindnow"
"format"
"fortify"
@ -44,7 +44,7 @@
"relro"
"stackprotector"
"strictoverflow"
] ++ lib.optional (
] ++ lib.optional (with stdenvNoCC;
# Musl-based platforms will keep "pie", other platforms will not.
# If you change this, make sure to update section `{#sec-hardening-in-nixpkgs}`
# in the nixpkgs manual to inform users about the defaults.
@ -59,15 +59,30 @@
, postLinkSignHook ? null, signingUtils ? null
}:
with lib;
assert nativeTools -> !propagateDoc && nativePrefix != "";
assert !nativeTools ->
bintools != null && coreutils != null && gnugrep != null;
assert !nativeTools -> bintools != null && coreutils != null && gnugrep != null;
assert !(nativeLibc && noLibc);
assert (noLibc || nativeLibc) == (libc == null);
let
inherit (lib)
attrByPath
concatStringsSep
getBin
getDev
getLib
getName
getVersion
hasSuffix
optional
optionalAttrs
optionals
optionalString
platforms
removePrefix
replaceStrings
;
stdenv = stdenvNoCC;
inherit (stdenv) hostPlatform targetPlatform;
@ -75,18 +90,18 @@ let
#
# TODO(@Ericson2314) Make unconditional, or optional but always true by
# default.
targetPrefix = lib.optionalString (targetPlatform != hostPlatform)
targetPrefix = optionalString (targetPlatform != hostPlatform)
(targetPlatform.config + "-");
bintoolsVersion = lib.getVersion bintools;
bintoolsName = lib.removePrefix targetPrefix (lib.getName bintools);
bintoolsVersion = getVersion bintools;
bintoolsName = removePrefix targetPrefix (getName bintools);
libc_bin = lib.optionalString (libc != null) (getBin libc);
libc_dev = lib.optionalString (libc != null) (getDev libc);
libc_lib = lib.optionalString (libc != null) (getLib libc);
bintools_bin = lib.optionalString (!nativeTools) (getBin bintools);
libc_bin = optionalString (libc != null) (getBin libc);
libc_dev = optionalString (libc != null) (getDev libc);
libc_lib = optionalString (libc != null) (getLib libc);
bintools_bin = optionalString (!nativeTools) (getBin bintools);
# The wrapper scripts use 'cat' and 'grep', so we may need coreutils.
coreutils_bin = lib.optionalString (!nativeTools) (getBin coreutils);
coreutils_bin = optionalString (!nativeTools) (getBin coreutils);
# See description in cc-wrapper.
suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;
@ -114,11 +129,11 @@ let
else if targetPlatform.isLoongArch64 then "${sharedLibraryLoader}/lib/ld-linux-loongarch*.so.1"
else if targetPlatform.isDarwin then "/usr/lib/dyld"
else if targetPlatform.isFreeBSD then "/libexec/ld-elf.so.1"
else if lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1"
else if hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1"
else "";
expand-response-params =
lib.optionalString (buildPackages ? stdenv && buildPackages.stdenv.hasCC && buildPackages.stdenv.cc != "/dev/null")
optionalString (buildPackages ? stdenv && buildPackages.stdenv.hasCC && buildPackages.stdenv.cc != "/dev/null")
(import ../expand-response-params { inherit (buildPackages) stdenv; });
in
@ -126,7 +141,7 @@ in
stdenv.mkDerivation {
pname = targetPrefix
+ (if name != "" then name else "${bintoolsName}-wrapper");
version = lib.optionalString (bintools != null) bintoolsVersion;
version = optionalString (bintools != null) bintoolsVersion;
preferLocalBuild = true;
@ -196,7 +211,7 @@ stdenv.mkDerivation {
# as it must have both the GNU assembler from cctools (installed as `gas`)
# and the Clang integrated assembler (installed as `as`).
# See pkgs/os-specific/darwin/binutils/default.nix for details.
+ lib.optionalString wrapGas ''
+ optionalString wrapGas ''
if [ -e $ldPath/${targetPrefix}gas ]; then
ln -s $ldPath/${targetPrefix}gas $out/bin/${targetPrefix}gas
fi
@ -273,7 +288,7 @@ stdenv.mkDerivation {
${if targetPlatform.isDarwin then ''
printf "export LD_DYLD_PATH=%q\n" "$dynamicLinker" >> $out/nix-support/setup-hook
'' else lib.optionalString (sharedLibraryLoader != null) ''
'' else optionalString (sharedLibraryLoader != null) ''
if [ -e ${sharedLibraryLoader}/lib/32/ld-linux.so.2 ]; then
echo ${sharedLibraryLoader}/lib/32/ld-linux.so.2 > $out/nix-support/dynamic-linker-m32
fi
@ -290,7 +305,7 @@ stdenv.mkDerivation {
# install the wrapper, you get tools like objdump (same for any
# binaries of libc).
+ optionalString (!nativeTools) ''
printWords ${bintools_bin} ${lib.optionalString (libc != null) libc_bin} > $out/nix-support/propagated-user-env-packages
printWords ${bintools_bin} ${optionalString (libc != null) libc_bin} > $out/nix-support/propagated-user-env-packages
''
##
@ -406,7 +421,7 @@ stdenv.mkDerivation {
# for substitution in utils.bash
expandResponseParams = "${expand-response-params}/bin/expand-response-params";
shell = getBin shell + shell.shellPath or "";
gnugrep_bin = lib.optionalString (!nativeTools) gnugrep;
gnugrep_bin = optionalString (!nativeTools) gnugrep;
wrapperName = "BINTOOLS_WRAPPER";
inherit dynamicLinker targetPrefix suffixSalt coreutils_bin;
inherit bintools_bin libc_bin libc_dev libc_lib;
@ -414,13 +429,13 @@ stdenv.mkDerivation {
};
meta =
let bintools_ = lib.optionalAttrs (bintools != null) bintools; in
(lib.optionalAttrs (bintools_ ? meta) (removeAttrs bintools.meta ["priority"])) //
let bintools_ = optionalAttrs (bintools != null) bintools; in
(optionalAttrs (bintools_ ? meta) (removeAttrs bintools.meta ["priority"])) //
{ description =
lib.attrByPath ["meta" "description"] "System binary utilities" bintools_
attrByPath ["meta" "description"] "System binary utilities" bintools_
+ " (wrapper script)";
priority = 10;
} // optionalAttrs useMacosReexportHack {
platforms = lib.platforms.darwin;
platforms = platforms.darwin;
};
}

View File

@ -31,10 +31,20 @@
assert (pname != null || version != null) -> (name == null && pname != null); # You must declare either a name or pname + version (preferred).
with builtins;
let
inherit (lib)
concatLines
concatStringsSep
escapeShellArgs
filter
optionalString
splitString
;
inherit (lib.attrsets) removeAttrs;
pname = if args ? name && args.name != null then args.name else args.pname;
versionStr = lib.optionalString (version != null) ("-" + version);
versionStr = optionalString (version != null) ("-" + version);
name = pname + versionStr;
buildFHSEnv = callPackage ./buildFHSEnv.nix { };
@ -116,10 +126,10 @@ let
exec ${run} "$@"
'';
indentLines = str: lib.concatLines (map (s: " " + s) (filter (s: s != "") (lib.splitString "\n" str)));
indentLines = str: concatLines (map (s: " " + s) (filter (s: s != "") (splitString "\n" str)));
bwrapCmd = { initArgs ? "" }: ''
${extraPreBwrapCmds}
ignored=(/nix /dev /proc /etc ${lib.optionalString privateTmp "/tmp"})
ignored=(/nix /dev /proc /etc ${optionalString privateTmp "/tmp"})
ro_mounts=()
symlinks=()
etc_ignored=()
@ -164,7 +174,7 @@ let
fi
# link selected etc entries from the actual root
for i in ${lib.escapeShellArgs etcBindEntries}; do
for i in ${escapeShellArgs etcBindEntries}; do
if [[ "''${etc_ignored[@]}" =~ "$i" ]]; then
continue
fi
@ -195,7 +205,7 @@ let
x11_args+=(--ro-bind-try "$local_socket" "$local_socket")
fi
${lib.optionalString privateTmp ''
${optionalString privateTmp ''
# sddm places XAUTHORITY in /tmp
if [[ "$XAUTHORITY" == /tmp/* ]]; then
x11_args+=(--ro-bind-try "$XAUTHORITY" "$XAUTHORITY")
@ -220,15 +230,15 @@ let
--dev-bind /dev /dev
--proc /proc
--chdir "$(pwd)"
${lib.optionalString unshareUser "--unshare-user"}
${lib.optionalString unshareIpc "--unshare-ipc"}
${lib.optionalString unsharePid "--unshare-pid"}
${lib.optionalString unshareNet "--unshare-net"}
${lib.optionalString unshareUts "--unshare-uts"}
${lib.optionalString unshareCgroup "--unshare-cgroup"}
${lib.optionalString dieWithParent "--die-with-parent"}
${optionalString unshareUser "--unshare-user"}
${optionalString unshareIpc "--unshare-ipc"}
${optionalString unsharePid "--unshare-pid"}
${optionalString unshareNet "--unshare-net"}
${optionalString unshareUts "--unshare-uts"}
${optionalString unshareCgroup "--unshare-cgroup"}
${optionalString dieWithParent "--die-with-parent"}
--ro-bind /nix /nix
${lib.optionalString privateTmp "--tmpfs /tmp"}
${optionalString privateTmp "--tmpfs /tmp"}
# Our glibc will look for the cache in its own path in `/nix/store`.
# As such, we need a cache to exist there, because pressure-vessel
# depends on the existence of an ld cache. However, adding one
@ -242,7 +252,7 @@ let
--symlink /etc/ld.so.cache ${glibc}/etc/ld.so.cache \
--ro-bind ${glibc}/etc/rpc ${glibc}/etc/rpc \
--remount-ro ${glibc}/etc \
'' + lib.optionalString (stdenv.isx86_64 && stdenv.isLinux) (indentLines ''
'' + optionalString (stdenv.isx86_64 && stdenv.isLinux) (indentLines ''
--tmpfs ${pkgsi686Linux.glibc}/etc \
--symlink /etc/ld.so.conf ${pkgsi686Linux.glibc}/etc/ld.so.conf \
--symlink /etc/ld.so.cache ${pkgsi686Linux.glibc}/etc/ld.so.cache \

View File

@ -1,10 +1,33 @@
{ lib, stdenv, coqPackages, coq, which, fetchzip }@args:
let lib = import ./extra-lib.nix {inherit (args) lib;}; in
with builtins; with lib;
let
lib = import ./extra-lib.nix {
inherit (args) lib;
};
inherit (lib)
concatStringsSep
flip
foldl
isFunction
isString
optional
optionalAttrs
optionals
optionalString
pred
remove
switch
versions
;
inherit (lib.attrsets) removeAttrs;
inherit (lib.strings) match;
isGitHubDomain = d: match "^github.*" d != null;
isGitLabDomain = d: match "^gitlab.*" d != null;
in
{ pname,
version ? null,
fetcher ? null,

View File

@ -1,5 +1,25 @@
{ lib }:
with builtins; with lib; recursiveUpdate lib (rec {
let
inherit (lib)
all
concatStringsSep
findFirst
flip
getAttr
head
isFunction
length
recursiveUpdate
splitVersion
tail
take
versionAtLeast
versionOlder
zipListsWith
;
in
recursiveUpdate lib (rec {
versions =
let

View File

@ -1,8 +1,33 @@
{ lib, stdenv, fetchzip }@args:
let lib' = lib; in
let lib = import ../extra-lib.nix {lib = lib';}; in
with builtins; with lib;
let
lib = import ../extra-lib.nix {
inherit (args) lib;
};
inherit (lib)
attrNames
fakeSha256
filter
findFirst
head
isAttrs
isPath
isString
last
length
optionalAttrs
pathExists
pred
sort
switch
switch-if
versionAtLeast
versions
;
inherit (lib.strings) match split;
default-fetcher = {domain ? "github.com", owner ? "", repo, rev, name ? "source", sha256 ? null, ...}@args:
let ext = if args?sha256 then "zip" else "tar.gz";
fmt = if args?sha256 then "zip" else "tarball";
@ -17,7 +42,7 @@ let
{ cond = (match "(www.)?mpi-sws.org" domain) != null;
out = "https://www.mpi-sws.org/~${owner}/${repo}/download/${repo}-${rev}.${ext}";}
] (throw "meta-fetch: no fetcher found for domain ${domain} on ${rev}");
fetch = x: if args?sha256 then fetchzip (x // { inherit sha256; }) else fetchTarball x;
fetch = x: if args?sha256 then fetchzip (x // { inherit sha256; }) else builtins.fetchTarball x;
in fetch { inherit url ; };
in
{
@ -38,11 +63,12 @@ switch arg [
{ case = isNull; out = { version = "broken"; src = ""; broken = true; }; }
{ case = isPathString; out = { version = "dev"; src = arg; }; }
{ case = pred.union isVersion isShortVersion;
out = let v = if isVersion arg then arg else shortVersion arg; in
let
out = let
v = if isVersion arg then arg else shortVersion arg;
given-sha256 = release.${v}.sha256 or "";
sha256 = if given-sha256 == "" then lib.fakeSha256 else given-sha256;
rv = release.${v} // { inherit sha256; }; in
sha256 = if given-sha256 == "" then fakeSha256 else given-sha256;
rv = release.${v} // { inherit sha256; };
in
{
version = rv.version or v;
src = rv.src or fetcher (location // { rev = releaseRev v; } // rv);

View File

@ -9,9 +9,14 @@
assert repoRepoRev != "" -> repoRepoURL != "";
assert createMirror -> !useArchive;
with lib;
let
inherit (lib)
concatMapStringsSep
concatStringsSep
fetchers
optionalString
;
extraRepoInitFlags = [
(optionalString (repoRepoURL != "") "--repo-url=${repoRepoURL}")
(optionalString (repoRepoRev != "") "--repo-branch=${repoRepoRev}")

View File

@ -1,6 +1,14 @@
{ fetchgit, fetchhg, fetchzip, lib }:
lib.makeOverridable (
let
inherit (lib)
assertOneOf
makeOverridable
optionalString
;
in
makeOverridable (
{ owner
, repo, rev
, domain ? "sr.ht"
@ -10,9 +18,7 @@ lib.makeOverridable (
, ... # For hash agility
} @ args:
with lib;
assert (lib.assertOneOf "vc" vc [ "hg" "git" ]);
assert (assertOneOf "vc" vc [ "hg" "git" ]);
let
urlFor = resource: "https://${resource}.${domain}/${owner}/${repo}";

View File

@ -7,9 +7,32 @@
# - zero or more directories. For example, "a/**/b" matches "a/b",
# - "a/x/b", "a/x/y/b" and so on.
with builtins;
let
inherit (builtins) filterSource;
inherit (lib)
concatStringsSep
elemAt
filter
head
isList
length
optionals
optionalString
pathExists
readFile
removePrefix
replaceStrings
stringLength
sub
substring
toList
trace
;
inherit (lib.strings) match split typeOf;
debug = a: trace a a;
last = l: elemAt l ((length l) - 1);
in rec {
@ -17,7 +40,7 @@ in rec {
filterPattern = patterns: root:
(name: _type:
let
relPath = lib.removePrefix ((toString root) + "/") name;
relPath = removePrefix ((toString root) + "/") name;
matches = pair: (match (head pair) relPath) != null;
matched = map (pair: [(matches pair) (last pair)]) patterns;
in
@ -45,7 +68,7 @@ in rec {
escs = "\\*?";
splitString =
let recurse = str : [(substring 0 1 str)] ++
(lib.optionals (str != "") (recurse (substring 1 (stringLength(str)) str) ));
(optionals (str != "") (recurse (substring 1 (stringLength(str)) str) ));
in str : recurse str;
chars = s: filter (c: c != "" && !isList c) (splitString s);
escape = s: map (c: "\\" + c) (chars s);
@ -66,7 +89,7 @@ in rec {
handleSlashPrefix = l:
let
split = (match "^(/?)(.*)" l);
findSlash = l: lib.optionalString ((match ".+/.+" l) == null) l;
findSlash = l: optionalString ((match ".+/.+" l) == null) l;
hasSlash = mapAroundCharclass findSlash l != l;
in
(if (elemAt split 0) == "/" || hasSlash
@ -94,12 +117,12 @@ in rec {
gitignoreCompileIgnore = file_str_patterns: root:
let
onPath = f: a: if typeOf a == "path" then f a else a;
str_patterns = map (onPath readFile) (lib.toList file_str_patterns);
str_patterns = map (onPath readFile) (toList file_str_patterns);
in concatStringsSep "\n" str_patterns;
gitignoreFilterPure = filter: patterns: root: name: type:
gitignoreFilterPure = predicate: patterns: root: name: type:
gitignoreFilter (gitignoreCompileIgnore patterns root) root name type
&& filter name type;
&& predicate name type;
# This is a very hacky way of programming this!
# A better way would be to reuse existing filtering by making multiple gitignore functions per each root.
@ -145,23 +168,23 @@ in rec {
'');
withGitignoreFile = patterns: root:
lib.toList patterns ++ [ ".git" ] ++ [(root + "/.gitignore")];
toList patterns ++ [ ".git" ] ++ [(root + "/.gitignore")];
withRecursiveGitignoreFile = patterns: root:
lib.toList patterns ++ [ ".git" ] ++ [(compileRecursiveGitignore root)];
toList patterns ++ [ ".git" ] ++ [(compileRecursiveGitignore root)];
# filterSource derivatives
gitignoreFilterSourcePure = filter: patterns: root:
filterSource (gitignoreFilterPure filter patterns root) root;
gitignoreFilterSourcePure = predicate: patterns: root:
filterSource (gitignoreFilterPure predicate patterns root) root;
gitignoreFilterSource = filter: patterns: root:
gitignoreFilterSourcePure filter (withGitignoreFile patterns root) root;
gitignoreFilterSource = predicate: patterns: root:
gitignoreFilterSourcePure predicate (withGitignoreFile patterns root) root;
gitignoreFilterRecursiveSource = filter: patterns: root:
gitignoreFilterSourcePure filter (withRecursiveGitignoreFile patterns root) root;
gitignoreFilterRecursiveSource = predicate: patterns: root:
gitignoreFilterSourcePure predicate (withRecursiveGitignoreFile patterns root) root;
# "Filter"-less alternatives
# "Predicate"-less alternatives
gitignoreSourcePure = gitignoreFilterSourcePure (_: _: true);
gitignoreSource = patterns: let type = typeOf patterns; in

View File

@ -10,9 +10,17 @@
, extraPackages ? [], extraBuildCommands ? ""
}:
with lib;
let
inherit (lib)
attrByPath
getBin
optional
optionalAttrs
optionals
optionalString
replaceStrings
;
stdenv = stdenvNoCC;
inherit (stdenv) hostPlatform targetPlatform;
@ -20,7 +28,7 @@ let
#
# TODO(@Ericson2314) Make unconditional, or optional but always true by
# default.
targetPrefix = lib.optionalString (targetPlatform != hostPlatform)
targetPrefix = optionalString (targetPlatform != hostPlatform)
(targetPlatform.config + "-");
# See description in cc-wrapper.
@ -49,7 +57,7 @@ stdenv.mkDerivation {
dontUnpack = true;
# Additional flags passed to pkg-config.
addFlags = lib.optional stdenv.targetPlatform.isStatic "--static";
addFlags = optional stdenv.targetPlatform.isStatic "--static";
installPhase =
''
@ -119,10 +127,10 @@ stdenv.mkDerivation {
};
meta =
let pkg-config_ = lib.optionalAttrs (pkg-config != null) pkg-config; in
(lib.optionalAttrs (pkg-config_ ? meta) (removeAttrs pkg-config.meta ["priority"])) //
let pkg-config_ = optionalAttrs (pkg-config != null) pkg-config; in
(optionalAttrs (pkg-config_ ? meta) (removeAttrs pkg-config.meta ["priority"])) //
{ description =
lib.attrByPath ["meta" "description"] "pkg-config" pkg-config_
attrByPath ["meta" "description"] "pkg-config" pkg-config_
+ " (wrapper script)";
priority = 10;
};

View File

@ -1,6 +1,24 @@
{ lib, pkgs }:
with pkgs;
let
inherit (lib) optionalString;
inherit (pkgs)
autoconf
automake
checkinstall
clang-analyzer
cov-build
enableGCOVInstrumentation
lcov
libtool
makeGCOVReport
runCommand
stdenv
vmTools
xz
;
in
rec {
@ -91,7 +109,7 @@ rec {
dontConfigure = true;
dontBuild = true;
patchPhase = lib.optionalString isNixOS ''
patchPhase = optionalString isNixOS ''
touch .update-on-nixos-rebuild
'';

View File

@ -19,9 +19,20 @@
# (and all of its dependencies) without rebuilding further.
{ drv, oldDependency, newDependency, verbose ? true }:
with lib;
let
inherit (lib)
any
attrNames
concatStringsSep
elem
filter
filterAttrs
listToAttrs
mapAttrsToList
stringLength
substring
;
warn = if verbose then builtins.trace else (x: y: y);
references = import (runCommandLocal "references.nix" { exportReferencesGraph = [ "graph" drv ]; } ''
(echo {
@ -54,7 +65,7 @@ let
(drv: { name = discard (toString drv);
value = elem oldStorepath (referencesOf drv) ||
any dependsOnOld (referencesOf drv);
}) (builtins.attrNames references));
}) (attrNames references));
dependsOnOld = drv: dependsOnOldMemo.${discard (toString drv)};
@ -74,9 +85,9 @@ let
rewriteMemo = listToAttrs (map
(drv: { name = discard (toString drv);
value = rewriteHashes (builtins.storePath drv)
(filterAttrs (n: v: builtins.elem (builtins.storePath (discard (toString n))) (referencesOf drv)) rewriteMemo);
(filterAttrs (n: v: elem (builtins.storePath (discard (toString n))) (referencesOf drv)) rewriteMemo);
})
(filter dependsOnOld (builtins.attrNames references))) // rewrittenDeps;
(filter dependsOnOld (attrNames references))) // rewrittenDeps;
drvHash = discard (toString drv);
in assert (stringLength (drvName (toString oldDependency)) == stringLength (drvName (toString newDependency)));

View File

@ -88,6 +88,7 @@ autoPatchelf() {
--extra-args "${patchelfFlagsArray[@]}"
}
autoPatchelfPostFixup() {
# XXX: This should ultimately use fixupOutputHooks but we currently don't have
# a way to enforce the order. If we have $runtimeDependencies set, the setup
# hook of patchelf is going to ruin everything and strip out those additional
@ -96,14 +97,12 @@ autoPatchelf() {
# So what we do here is basically run in postFixup and emulate the same
# behaviour as fixupOutputHooks because the setup hook for patchelf is run in
# fixupOutput and the postFixup hook runs later.
#
# shellcheck disable=SC2016
# (Expressions don't expand in single quotes, use double quotes for that.)
postFixupHooks+=('
if [ -z "${dontAutoPatchelf-}" ]; then
if [[ -z "${dontAutoPatchelf-}" ]]; then
autoPatchelf -- $(for output in $(getAllOutputNames); do
[ -e "${!output}" ] || continue
echo "${!output}"
done)
fi
')
}
postFixupHooks+=(autoPatchelfPostFixup)

View File

@ -19,6 +19,7 @@ assertExecutable() {
# (if unset or empty, defaults to EXECUTABLE)
# --inherit-argv0 : the executable inherits argv0 from the wrapper.
# (use instead of --argv0 '$0')
# --resolve-argv0 : if argv0 doesn't include a / character, resolve it against PATH
# --set VAR VAL : add VAR with value VAL to the executable's environment
# --set-default VAR VAL : like --set, but only adds VAR if not already set in
# the environment
@ -87,6 +88,7 @@ makeDocumentedCWrapper() {
makeCWrapper() {
local argv0 inherit_argv0 n params cmd main flagsBefore flagsAfter flags executable length
local uses_prefix uses_suffix uses_assert uses_assert_success uses_stdio uses_asprintf
local resolve_path
executable=$(escapeStringLiteral "$1")
params=("$@")
length=${#params[*]}
@ -169,6 +171,12 @@ makeCWrapper() {
# Whichever comes last of --argv0 and --inherit-argv0 wins
inherit_argv0=1
;;
--resolve-argv0)
# this gets processed after other argv0 flags
uses_stdio=1
uses_string=1
resolve_argv0=1
;;
*) # Using an error macro, we will make sure the compiler gives an understandable error message
main="$main#error makeCWrapper: Unknown argument ${p}"$'\n'
;;
@ -176,6 +184,7 @@ makeCWrapper() {
done
[[ -z "$flagsBefore" && -z "$flagsAfter" ]] || main="$main"${main:+$'\n'}$(addFlags "$flagsBefore" "$flagsAfter")$'\n'$'\n'
[ -z "$inherit_argv0" ] && main="${main}argv[0] = \"${argv0:-${executable}}\";"$'\n'
[ -z "$resolve_argv0" ] || main="${main}argv[0] = resolve_argv0(argv[0]);"$'\n'
main="${main}return execv(\"${executable}\", argv);"$'\n'
[ -z "$uses_asprintf" ] || printf '%s\n' "#define _GNU_SOURCE /* See feature_test_macros(7) */"
@ -183,9 +192,11 @@ makeCWrapper() {
printf '%s\n' "#include <stdlib.h>"
[ -z "$uses_assert" ] || printf '%s\n' "#include <assert.h>"
[ -z "$uses_stdio" ] || printf '%s\n' "#include <stdio.h>"
[ -z "$uses_string" ] || printf '%s\n' "#include <string.h>"
[ -z "$uses_assert_success" ] || printf '\n%s\n' "#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)"
[ -z "$uses_prefix" ] || printf '\n%s\n' "$(setEnvPrefixFn)"
[ -z "$uses_suffix" ] || printf '\n%s\n' "$(setEnvSuffixFn)"
[ -z "$resolve_argv0" ] || printf '\n%s\n' "$(resolveArgv0Fn)"
printf '\n%s' "int main(int argc, char **argv) {"
printf '\n%s' "$(indent4 "$main")"
printf '\n%s\n' "}"
@ -338,6 +349,41 @@ void set_env_suffix(char *env, char *sep, char *suffix) {
"
}
resolveArgv0Fn() {
printf '%s' "\
char *resolve_argv0(char *argv0) {
if (strchr(argv0, '/') != NULL) {
return argv0;
}
char *path = getenv(\"PATH\");
if (path == NULL) {
return argv0;
}
char *path_copy = strdup(path);
if (path_copy == NULL) {
return argv0;
}
char *dir = strtok(path_copy, \":\");
while (dir != NULL) {
char *candidate = malloc(strlen(dir) + strlen(argv0) + 2);
if (candidate == NULL) {
free(path_copy);
return argv0;
}
sprintf(candidate, \"%s/%s\", dir, argv0);
if (access(candidate, X_OK) == 0) {
free(path_copy);
return candidate;
}
free(candidate);
dir = strtok(NULL, \":\");
}
free(path_copy);
return argv0;
}
"
}
# Embed a C string which shows up as readable text in the compiled binary wrapper,
# giving instructions for recreating the wrapper.
# Keep in sync with makeBinaryWrapper.extractCmd

View File

@ -15,6 +15,7 @@ assertExecutable() {
# (if unset or empty, defaults to EXECUTABLE)
# --inherit-argv0 : the executable inherits argv0 from the wrapper.
# (use instead of --argv0 '$0')
# --resolve-argv0 : if argv0 doesn't include a / character, resolve it against PATH
# --set VAR VAL : add VAR with value VAL to the executable's environment
# --set-default VAR VAL : like --set, but only adds VAR if not already set in
# the environment
@ -177,6 +178,9 @@ makeShellWrapper() {
elif [[ "$p" == "--inherit-argv0" ]]; then
# Whichever comes last of --argv0 and --inherit-argv0 wins
argv0='$0'
elif [[ "$p" == "--resolve-argv0" ]]; then
# this is noop in shell wrappers, since bash will always resolve $0
resolve_argv0=1
else
die "makeWrapper doesn't understand the arg $p"
fi

View File

@ -1,5 +1,21 @@
with import ../../.. { };
with vmTools;
let
pkgs = import ../../.. { };
inherit (pkgs)
hello
patchelf
pcmanfm
stdenv
;
inherit (pkgs.vmTools)
buildRPM
diskImages
makeImageTestScript
runInLinuxImage
runInLinuxVM
;
in
{

View File

@ -1,4 +1,14 @@
{ pkgs, buildPackages, lib, stdenv, libiconv, mkNugetDeps, mkNugetSource, gixy }:
{
buildPackages,
gixy,
lib,
libiconv,
makeBinaryWrapper,
mkNugetDeps,
mkNugetSource,
pkgs,
stdenv,
}:
let
inherit (lib)
concatMapStringsSep
@ -6,7 +16,6 @@ let
escapeShellArg
last
optionalString
stringLength
strings
types
;
@ -18,15 +27,22 @@ rec {
# Examples:
# writeBash = makeScriptWriter { interpreter = "${pkgs.bash}/bin/bash"; }
# makeScriptWriter { interpreter = "${pkgs.dash}/bin/dash"; } "hello" "echo hello world"
makeScriptWriter = { interpreter, check ? "" }: nameOrPath: content:
makeScriptWriter = { interpreter, check ? "", makeWrapperArgs ? [], }: nameOrPath: content:
assert (types.path.check nameOrPath) || (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
assert (types.path.check content) || (types.str.check content);
let
nameIsPath = types.path.check nameOrPath;
name = last (builtins.split "/" nameOrPath);
in
path = if nameIsPath then nameOrPath else "/bin/${name}";
# The inner derivation which creates the executable under $out/bin (never at $out directly)
# This is required in order to support wrapping, as wrapped programs consist of at least two files: the executable and the wrapper.
inner =
pkgs.runCommandLocal name (
lib.optionalAttrs (nameOrPath == "/bin/${name}") {
{
inherit makeWrapperArgs;
nativeBuildInputs = [
makeBinaryWrapper
];
meta.mainProgram = name;
}
// (
@ -69,32 +85,61 @@ rec {
${check} $out
''}
chmod +x $out
${optionalString (types.path.check nameOrPath) ''
# Relocate executable
# Wrap it if makeWrapperArgs are specified
mv $out tmp
mkdir -p $out/$(dirname "${nameOrPath}")
mv tmp $out/${nameOrPath}
''}
mkdir -p $out/$(dirname "${path}")
mv tmp $out/${path}
if [ -n "''${makeWrapperArgs+''${makeWrapperArgs[@]}}" ]; then
wrapProgram $out/${path} ''${makeWrapperArgs[@]}
fi
'';
in
if nameIsPath
then inner
# In case nameOrPath is a name, the user intends the executable to be located at $out.
# This is achieved by creating a separate derivation containing a symlink at $out linking to ${inner}/bin/${name}.
# This breaks the override pattern.
# In case this turns out to be a problem, we can still add more magic
else pkgs.runCommandLocal name {} ''
ln -s ${inner}/bin/${name} $out
'';
# Base implementation for compiled executables.
# Takes a compile script, which in turn takes the name as an argument.
#
# Examples:
# writeSimpleC = makeBinWriter { compileScript = name: "gcc -o $out $contentPath"; }
makeBinWriter = { compileScript, strip ? true }: nameOrPath: content:
makeBinWriter = { compileScript, strip ? true, makeWrapperArgs ? [] }: nameOrPath: content:
assert (types.path.check nameOrPath) || (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
assert (types.path.check content) || (types.str.check content);
let
nameIsPath = types.path.check nameOrPath;
name = last (builtins.split "/" nameOrPath);
in
pkgs.runCommand name ((if (types.str.check content) then {
path = if nameIsPath then nameOrPath else "/bin/${name}";
# The inner derivation which creates the executable under $out/bin (never at $out directly)
# This is required in order to support wrapping, as wrapped programs consist of at least two files: the executable and the wrapper.
inner =
pkgs.runCommandLocal name (
{
inherit makeWrapperArgs;
nativeBuildInputs = [
makeBinaryWrapper
];
meta.mainProgram = name;
}
// (
if (types.str.check content) then {
inherit content;
passAsFile = [ "content" ];
} else {
contentPath = content;
}) // lib.optionalAttrs (nameOrPath == "/bin/${name}") {
meta.mainProgram = name;
}) ''
}
)
)
''
${compileScript}
${lib.optionalString strip
"${lib.getBin buildPackages.bintools-unwrapped}/bin/${buildPackages.bintools-unwrapped.targetPrefix}strip -S $out"}
@ -102,53 +147,165 @@ rec {
# mach-o executables from the get-go, but need to be corrected somehow
# which is done by fixupPhase.
${lib.optionalString pkgs.stdenvNoCC.hostPlatform.isDarwin "fixupPhase"}
${optionalString (types.path.check nameOrPath) ''
mv $out tmp
mkdir -p $out/$(dirname "${nameOrPath}")
mv tmp $out/${nameOrPath}
''}
mkdir -p $out/$(dirname "${path}")
mv tmp $out/${path}
if [ -n "''${makeWrapperArgs+''${makeWrapperArgs[@]}}" ]; then
wrapProgram $out/${path} ''${makeWrapperArgs[@]}
fi
'';
in
if nameIsPath
then inner
# In case nameOrPath is a name, the user intends the executable to be located at $out.
# This is achieved by creating a separate derivation containing a symlink at $out linking to ${inner}/bin/${name}.
# This breaks the override pattern.
# In case this turns out to be a problem, we can still add more magic
else pkgs.runCommandLocal name {} ''
ln -s ${inner}/bin/${name} $out
'';
# Like writeScript but the first line is a shebang to bash
#
# Example:
# Can be called with or without extra arguments.
#
# Example without arguments:
# writeBash "example" ''
# echo hello world
# ''
writeBash = makeScriptWriter {
interpreter = "${lib.getExe pkgs.bash}";
};
#
# Example with arguments:
# writeBash "example"
# {
# makeWrapperArgs = [
# "--prefix" "PATH" ":" "${pkgs.hello}/bin"
# ];
# }
# ''
# hello
# ''
writeBash = name: argsOrScript:
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript
then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.bash}"; }) name
else makeScriptWriter { interpreter = "${lib.getExe pkgs.bash}"; } name argsOrScript;
# Like writeScriptBin but the first line is a shebang to bash
#
# Can be called with or without extra arguments.
#
# Example without arguments:
# writeBashBin "example" ''
# echo hello world
# ''
#
# Example with arguments:
# writeBashBin "example"
# {
# makeWrapperArgs = [
# "--prefix", "PATH", ":", "${pkgs.hello}/bin",
# ];
# }
# ''
# hello
# ''
writeBashBin = name:
writeBash "/bin/${name}";
# Like writeScript but the first line is a shebang to dash
#
# Example:
# Can be called with or without extra arguments.
#
# Example without arguments:
# writeDash "example" ''
# echo hello world
# ''
writeDash = makeScriptWriter {
interpreter = "${lib.getExe pkgs.dash}";
};
#
# Example with arguments:
# writeDash "example"
# {
# makeWrapperArgs = [
# "--prefix", "PATH", ":", "${pkgs.hello}/bin",
# ];
# }
# ''
# hello
# ''
writeDash = name: argsOrScript:
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript
then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.dash}"; }) name
else makeScriptWriter { interpreter = "${lib.getExe pkgs.dash}"; } name argsOrScript;
# Like writeScriptBin but the first line is a shebang to dash
#
# Can be called with or without extra arguments.
#
# Example without arguments:
# writeDashBin "example" ''
# echo hello world
# ''
#
# Example with arguments:
# writeDashBin "example"
# {
# makeWrapperArgs = [
# "--prefix", "PATH", ":", "${pkgs.hello}/bin",
# ];
# }
# ''
# hello
# ''
writeDashBin = name:
writeDash "/bin/${name}";
# Like writeScript but the first line is a shebang to fish
#
# Example:
# Can be called with or without extra arguments.
#
# Example without arguments:
# writeFish "example" ''
# echo hello world
# ''
writeFish = makeScriptWriter {
#
# Example with arguments:
# writeFish "example"
# {
# makeWrapperArgs = [
# "--prefix", "PATH", ":", "${pkgs.hello}/bin",
# ];
# }
# ''
# hello
# ''
writeFish = name: argsOrScript:
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript
then makeScriptWriter (argsOrScript // {
interpreter = "${lib.getExe pkgs.fish} --no-config";
check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only
};
}) name
else makeScriptWriter {
interpreter = "${lib.getExe pkgs.fish} --no-config";
check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only
} name argsOrScript;
# Like writeScriptBin but the first line is a shebang to fish
#
# Can be called with or without extra arguments.
#
# Example without arguments:
# writeFishBin "example" ''
# echo hello world
# ''
#
# Example with arguments:
# writeFishBin "example"
# {
# makeWrapperArgs = [
# "--prefix", "PATH", ":", "${pkgs.hello}/bin",
# ];
# }
# ''
# hello
# ''
writeFishBin = name:
writeFish "/bin/${name}";
@ -162,11 +319,12 @@ rec {
# main = launchMissiles
# '';
writeHaskell = name: {
libraries ? [],
ghc ? pkgs.ghc,
ghcArgs ? [],
libraries ? [],
makeWrapperArgs ? [],
strip ? true,
threadedRuntime ? true,
strip ? true
}:
let
appendIfNotSet = el: list: if elem el list then list else list ++ [ el ];
@ -178,7 +336,7 @@ rec {
${(ghc.withPackages (_: libraries ))}/bin/ghc ${lib.escapeShellArgs ghcArgs'} tmp.hs
mv tmp $out
'';
inherit strip;
inherit makeWrapperArgs strip;
} name;
# writeHaskellBin takes the same arguments as writeHaskell but outputs a directory (like writeScriptBin)
@ -187,36 +345,72 @@ rec {
# Like writeScript but the first line is a shebang to nu
#
# Example:
# Can be called with or without extra arguments.
#
# Example without arguments:
# writeNu "example" ''
# echo hello world
# ''
writeNu = makeScriptWriter {
interpreter = "${lib.getExe pkgs.nushell} --no-config-file";
};
#
# Example with arguments:
# writeNu "example"
# {
# makeWrapperArgs = [
# "--prefix", "PATH", ":", "${pkgs.hello}/bin",
# ];
# }
# ''
# hello
# ''
writeNu = name: argsOrScript:
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript
then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.nushell} --no-config-file"; }) name
else makeScriptWriter { interpreter = "${lib.getExe pkgs.nushell} --no-config-file"; } name argsOrScript;
# Like writeScriptBin but the first line is a shebang to nu
#
# Can be called with or without extra arguments.
#
# Example without arguments:
# writeNuBin "example" ''
# echo hello world
# ''
#
# Example with arguments:
# writeNuBin "example"
# {
# makeWrapperArgs = [
# "--prefix", "PATH", ":", "${pkgs.hello}/bin",
# ];
# }
# ''
# hello
# ''
writeNuBin = name:
writeNu "/bin/${name}";
# makeRubyWriter takes ruby and compatible rubyPackages and produces ruby script writer,
# If any libraries are specified, ruby.withPackages is used as interpreter, otherwise the "bare" ruby is used.
makeRubyWriter = ruby: rubyPackages: buildRubyPackages: name: { libraries ? [], }:
makeScriptWriter {
makeRubyWriter = ruby: rubyPackages: buildRubyPackages: name: { libraries ? [], ... } @ args:
makeScriptWriter (
(builtins.removeAttrs args ["libraries"])
// {
interpreter =
if libraries == []
then "${ruby}/bin/ruby"
else "${(ruby.withPackages (ps: libraries))}/bin/ruby";
# Rubocop doesnt seem to like running in this fashion.
# Rubocop doesn't seem to like running in this fashion.
#check = (writeDash "rubocop.sh" ''
# exec ${lib.getExe buildRubyPackages.rubocop} "$1"
#'');
} name;
}
) name;
# Like writeScript but the first line is a shebang to ruby
#
# Example:
# writeRuby "example" ''
# writeRuby "example" { libraries = [ pkgs.rubyPackages.git ]; } ''
# puts "hello world"
# ''
writeRuby = makeRubyWriter pkgs.ruby pkgs.rubyPackages buildPackages.rubyPackages;
@ -227,8 +421,10 @@ rec {
# makeLuaWriter takes lua and compatible luaPackages and produces lua script writer,
# which validates the script with luacheck at build time. If any libraries are specified,
# lua.withPackages is used as interpreter, otherwise the "bare" lua is used.
makeLuaWriter = lua: luaPackages: buildLuaPackages: name: { libraries ? [], }:
makeScriptWriter {
makeLuaWriter = lua: luaPackages: buildLuaPackages: name: { libraries ? [], ... } @ args:
makeScriptWriter (
(builtins.removeAttrs args ["libraries"])
// {
interpreter = lua.interpreter;
# if libraries == []
# then lua.interpreter
@ -237,7 +433,8 @@ rec {
check = (writeDash "luacheck.sh" ''
exec ${buildLuaPackages.luacheck}/bin/luacheck "$1"
'');
} name;
}
) name;
# writeLua takes a name an attributeset with libraries and some lua source code and
# returns an executable (should also work with luajit)
@ -265,9 +462,10 @@ rec {
writeLua "/bin/${name}";
writeRust = name: {
makeWrapperArgs ? [],
rustc ? pkgs.rustc,
rustcArgs ? [],
strip ? true
strip ? true,
}:
let
darwinArgs = lib.optionals stdenv.isDarwin [ "-L${lib.getLib libiconv}/lib" ];
@ -277,7 +475,7 @@ rec {
cp "$contentPath" tmp.rs
PATH=${lib.makeBinPath [pkgs.gcc]} ${rustc}/bin/rustc ${lib.escapeShellArgs rustcArgs} ${lib.escapeShellArgs darwinArgs} -o "$out" tmp.rs
'';
inherit strip;
inherit makeWrapperArgs strip;
} name;
writeRustBin = name:
@ -337,10 +535,13 @@ rec {
# use boolean;
# print "Howdy!\n" if true;
# ''
writePerl = name: { libraries ? [] }:
makeScriptWriter {
writePerl = name: { libraries ? [], ... } @ args:
makeScriptWriter (
(builtins.removeAttrs args ["libraries"])
// {
interpreter = "${lib.getExe (pkgs.perl.withPackages (p: libraries))}";
} name;
}
) name;
# writePerlBin takes the same arguments as writePerl but outputs a directory (like writeScriptBin)
writePerlBin = name:
@ -349,11 +550,14 @@ rec {
# makePythonWriter takes python and compatible pythonPackages and produces python script writer,
# which validates the script with flake8 at build time. If any libraries are specified,
# python.withPackages is used as interpreter, otherwise the "bare" python is used.
makePythonWriter = python: pythonPackages: buildPythonPackages: name: { libraries ? [], flakeIgnore ? [] }:
makePythonWriter = python: pythonPackages: buildPythonPackages: name: { libraries ? [], flakeIgnore ? [], ... } @ args:
let
ignoreAttribute = optionalString (flakeIgnore != []) "--ignore ${concatMapStringsSep "," escapeShellArg flakeIgnore}";
in
makeScriptWriter {
makeScriptWriter
(
(builtins.removeAttrs args ["libraries" "flakeIgnore"])
// {
interpreter =
if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then
if libraries == []
@ -364,7 +568,9 @@ rec {
check = optionalString python.isPy3k (writeDash "pythoncheck.sh" ''
exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"
'');
} name;
}
)
name;
# writePyPy2 takes a name an attributeset with libraries and some pypy2 sourcecode and
# returns an executable
@ -421,7 +627,7 @@ rec {
writePyPy3 "/bin/${name}";
makeFSharpWriter = { dotnet-sdk ? pkgs.dotnet-sdk, fsi-flags ? "", libraries ? _: [] }: nameOrPath:
makeFSharpWriter = { dotnet-sdk ? pkgs.dotnet-sdk, fsi-flags ? "", libraries ? _: [], ... } @ args: nameOrPath:
let
fname = last (builtins.split "/" nameOrPath);
path = if strings.hasSuffix ".fsx" nameOrPath then nameOrPath else "${nameOrPath}.fsx";
@ -442,9 +648,12 @@ rec {
${lib.getExe dotnet-sdk} fsi --quiet --nologo --readline- ${fsi-flags} "$@" < "$script"
'';
in content: makeScriptWriter {
in content: makeScriptWriter (
(builtins.removeAttrs args ["dotnet-sdk" "fsi-flags" "libraries"])
// {
interpreter = fsi;
} path
}
) path
''
#i "nuget: ${nuget-source}/lib"
${ content }
@ -456,5 +665,4 @@ rec {
writeFSharpBin = name:
writeFSharp "/bin/${name}";
}

View File

@ -1,13 +1,8 @@
{ glib
, haskellPackages
{ haskellPackages
, lib
, nodePackages
, perlPackages
, pypy2Packages
, python3Packages
, pypy3Packages
, luaPackages
, rubyPackages
, runCommand
, testers
, writers
@ -16,8 +11,38 @@
# If you are reading this, you can test these writers by running: nix-build . -A tests.writers
with writers;
let
inherit (lib) getExe recurseIntoAttrs;
inherit (writers)
makeFSharpWriter
writeBash
writeBashBin
writeDash
writeDashBin
writeFish
writeFishBin
writeFSharp
writeHaskell
writeHaskellBin
writeJS
writeJSBin
writeJSON
writeLua
writeNu
writePerl
writePerlBin
writePyPy3
writePython3
writePython3Bin
writeRuby
writeRust
writeRustBin
writeText
writeTOML
writeYAML
;
expectSuccess = test:
runCommand "run-${test.name}" {} ''
if [[ "$(${test})" != success ]]; then
@ -30,7 +55,7 @@ let
expectSuccessBin = test:
runCommand "run-${test.name}" {} ''
if [[ "$(${lib.getExe test})" != success ]]; then
if [[ "$(${getExe test})" != success ]]; then
echo 'test ${test.name} failed'
exit 1
fi
@ -44,8 +69,8 @@ let
in
testers.testEqualContents { expected = expectedFile; actual = file; assertion = "${file.name} matches"; };
in
lib.recurseIntoAttrs {
bin = lib.recurseIntoAttrs {
recurseIntoAttrs {
bin = recurseIntoAttrs {
bash = expectSuccessBin (writeBashBin "test-writers-bash-bin" ''
if [[ "test" == "test" ]]; then echo "success"; fi
'');
@ -145,7 +170,7 @@ lib.recurseIntoAttrs {
#'');
};
simple = lib.recurseIntoAttrs {
simple = recurseIntoAttrs {
bash = expectSuccess (writeBash "test-writers-bash" ''
if [[ "test" == "test" ]]; then echo "success"; fi
'');
@ -270,7 +295,7 @@ lib.recurseIntoAttrs {
'');
};
path = lib.recurseIntoAttrs {
path = recurseIntoAttrs {
bash = expectSuccess (writeBash "test-writers-bash-path" (writeText "test" ''
if [[ "test" == "test" ]]; then echo "success"; fi
''));
@ -310,4 +335,85 @@ lib.recurseIntoAttrs {
expected = "hello: world\n";
};
};
wrapping = recurseIntoAttrs {
bash-bin = expectSuccessBin (
writeBashBin "test-writers-wrapping-bash-bin"
{
makeWrapperArgs = [
"--set"
"ThaigerSprint"
"Thailand"
];
}
''
if [[ "$ThaigerSprint" == "Thailand" ]]; then
echo "success"
fi
''
);
bash = expectSuccess (
writeBash "test-writers-wrapping-bash"
{
makeWrapperArgs = [
"--set"
"ThaigerSprint"
"Thailand"
];
}
''
if [[ "$ThaigerSprint" == "Thailand" ]]; then
echo "success"
fi
''
);
python = expectSuccess (
writePython3 "test-writers-wrapping-python"
{
makeWrapperArgs = [
"--set"
"ThaigerSprint"
"Thailand"
];
}
''
import os
if os.environ.get("ThaigerSprint") == "Thailand":
print("success")
''
);
rust = expectSuccess (
writeRust "test-writers-wrapping-rust"
{
makeWrapperArgs = [
"--set"
"ThaigerSprint"
"Thailand"
];
}
''
fn main(){
if std::env::var("ThaigerSprint").unwrap() == "Thailand" {
println!("success")
}
}
''
);
no-empty-wrapper = let
bin = writeBashBin "bin" { makeWrapperArgs = []; } ''true'';
in runCommand "run-test-writers-wrapping-no-empty-wrapper" {} ''
ls -A ${bin}/bin
if [ $(ls -A ${bin}/bin | wc -l) -eq 1 ]; then
touch $out
else
echo "Error: Empty wrapper was created" >&2
exit 1
fi
'';
};
}

View File

@ -0,0 +1,38 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, libdrm
, libva
}:
stdenv.mkDerivation rec {
pname = "onevpl-intel-gpu";
version = "23.4.3";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "oneapi-src";
repo = "oneVPL-intel-gpu";
rev = "intel-onevpl-${version}";
sha256 = "sha256-oDwDMUq6JpRJH5nbANb7TJLW7HRYA9y0xZxEsoepx/U=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libdrm libva ];
meta = {
description = "oneAPI Video Processing Library Intel GPU implementation";
homepage = "https://github.com/oneapi-src/oneVPL-intel-gpu";
changelog = "https://github.com/oneapi-src/oneVPL-intel-gpu/releases/tag/${src.rev}";
license = [ lib.licenses.mit ];
platforms = lib.platforms.linux;
# CMake adds x86 specific compiler flags in <source>/builder/FindGlobals.cmake
# NOTE: https://github.com/oneapi-src/oneVPL-intel-gpu/issues/303
broken = !stdenv.hostPlatform.isx86;
maintainers = [ lib.maintainers.evanrichter ];
};
}

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "volk";
version = "1.3.275.0";
version = "1.3.280.0";
src = fetchFromGitHub {
owner = "zeux";
repo = "volk";
rev = "vulkan-sdk-${finalAttrs.version}";
hash = "sha256-uTjLgJMGN8nOVhVIl/GNhO2jXe9ebhc9vzAwCDwfuf4=";
hash = "sha256-e4TLGRqn0taYeiRVxc9WevURjO5dsVq3RpOwZBGDknQ=";
};
nativeBuildInputs = [ cmake ];

View File

@ -10,13 +10,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "waf";
version = "2.0.26";
version = "2.0.27";
src = fetchFromGitLab {
owner = "ita1024";
repo = "waf";
rev = "waf-${finalAttrs.version}";
hash = "sha256-AXDMWlwivJ0Xot6iwuIIlbV2Anz6ieghyOI9jA4yrko=";
hash = "sha256-GeEoD5CHubwR4ndGk7J7czEf0hWtPQr88TqJDPqeK0s=";
};
nativeBuildInputs = [

View File

@ -33,6 +33,7 @@ buildPythonApplication rec {
pythonRelaxDeps = [
"more-itertools"
"packaging"
];
propagatedBuildInputs = [

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, enableMultilib
, targetConfig
}:
let
@ -196,6 +197,13 @@ originalAttrs: (stdenv.mkDerivation (finalAttrs: originalAttrs // {
mkdir -p "$out/''${targetConfig}/lib"
mkdir -p "''${!outputLib}/''${targetConfig}/lib"
'' +
# if cross-compiling, link from $lib/lib to $lib/${targetConfig}.
# since native-compiles have $lib/lib as a directory (not a
# symlink), this ensures that in every case we can assume that
# $lib/lib contains the .so files
lib.optionalString (with stdenv; targetPlatform.config != hostPlatform.config) ''
ln -Ts "''${!outputLib}/''${targetConfig}/lib" $lib/lib
'' +
# Make `lib64` symlinks to `lib`.
lib.optionalString (!enableMultilib && stdenv.hostPlatform.is64bit && !stdenv.hostPlatform.isMips64n32) ''
ln -s lib "$out/''${targetConfig}/lib64"

View File

@ -83,10 +83,6 @@ in
lib.optionalString (!langC) ''
rm -f $out/lib/libgcc_s.so*
''
+ lib.optionalString (hostPlatform != targetPlatform) ''
mkdir -p $lib/lib/
ln -s ${targetPlatformSlash}lib $lib/lib
''
# TODO(amjoseph): remove the `libgcc_s.so` symlinks below and replace them
# with a `-L${gccForLibs.libgcc}/lib` in cc-wrapper's

View File

@ -103,6 +103,7 @@ let inherit version;
disableBootstrap = atLeast11 && !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler);
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
patches = callFile ./patches {};
@ -124,6 +125,7 @@ let inherit version;
buildPlatform
hostPlatform
targetPlatform
targetConfig
patches
crossMingw
stageNameAddon
@ -329,7 +331,7 @@ lib.pipe ((callFile ./common/builder.nix {}) ({
++ optional (is7 && targetPlatform.isAarch64) "--enable-fix-cortex-a53-843419"
++ optional (is7 && targetPlatform.isNetBSD) "--disable-libcilkrts";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
inherit targetConfig;
buildFlags =
# we do not yet have Nix-driven profiling

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, callPackage
, fetchpatch
, pkg-config
, swift
, swiftpm
@ -41,7 +42,11 @@ stdenv.mkDerivation {
patch -p1 -d .build/checkouts/indexstore-db -i ${./patches/indexstore-db-macos-target.patch}
swiftpmMakeMutable swift-tools-support-core
patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch}
patch -p1 -d .build/checkouts/swift-tools-support-core -i ${fetchpatch {
url = "https://github.com/apple/swift-tools-support-core/commit/990afca47e75cce136d2f59e464577e68a164035.patch";
hash = "sha256-PLzWsp+syiUBHhEFS8+WyUcSae5p0Lhk7SSRdNvfouE=";
includes = [ "Sources/TSCBasic/FileSystem.swift" ];
}}
# This toggles a section specific to Xcode XCTest, which doesn't work on
# Darwin, where we also use swift-corelibs-xctest.

View File

@ -54,7 +54,11 @@ stdenv.mkDerivation {
configurePhase = generated.configure + ''
swiftpmMakeMutable swift-tools-support-core
patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch}
patch -p1 -d .build/checkouts/swift-tools-support-core -i ${fetchpatch {
url = "https://github.com/apple/swift-tools-support-core/commit/990afca47e75cce136d2f59e464577e68a164035.patch";
hash = "sha256-PLzWsp+syiUBHhEFS8+WyUcSae5p0Lhk7SSRdNvfouE=";
includes = [ "Sources/TSCBasic/FileSystem.swift" ];
}}
'';
# TODO: Tests depend on indexstore-db being provided by an existing Swift

View File

@ -1,33 +0,0 @@
From 8d9ab4b6ed24a97e8af0cc338a52aacdcf438b8c Mon Sep 17 00:00:00 2001
From: Pavel Sobolev <paveloom@riseup.net>
Date: Tue, 21 Nov 2023 20:53:33 +0300
Subject: [PATCH] Force-unwrap file handles.
---
Sources/TSCBasic/FileSystem.swift | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift
index 3a63bdf..a1f3d9d 100644
--- a/Sources/TSCBasic/FileSystem.swift
+++ b/Sources/TSCBasic/FileSystem.swift
@@ -425,7 +425,7 @@ private class LocalFileSystem: FileSystem {
if fp == nil {
throw FileSystemError(errno: errno, path)
}
- defer { fclose(fp) }
+ defer { fclose(fp!) }
// Read the data one block at a time.
let data = BufferedOutputByteStream()
@@ -455,7 +455,7 @@ private class LocalFileSystem: FileSystem {
if fp == nil {
throw FileSystemError(errno: errno, path)
}
- defer { fclose(fp) }
+ defer { fclose(fp!) }
// Write the data in one chunk.
var contents = bytes.contents
--
2.42.0

View File

@ -1,5 +1,6 @@
{ lib
, stdenv
, fetchpatch
, callPackage
, swift
, swiftpm
@ -21,7 +22,11 @@ stdenv.mkDerivation {
configurePhase = generated.configure + ''
swiftpmMakeMutable swift-tools-support-core
patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch}
patch -p1 -d .build/checkouts/swift-tools-support-core -i ${fetchpatch {
url = "https://github.com/apple/swift-tools-support-core/commit/990afca47e75cce136d2f59e464577e68a164035.patch";
hash = "sha256-PLzWsp+syiUBHhEFS8+WyUcSae5p0Lhk7SSRdNvfouE=";
includes = [ "Sources/TSCBasic/FileSystem.swift" ];
}}
'';
# We only install the swift-format binary, so don't need the other products.

View File

@ -1,33 +0,0 @@
From 8d9ab4b6ed24a97e8af0cc338a52aacdcf438b8c Mon Sep 17 00:00:00 2001
From: Pavel Sobolev <paveloom@riseup.net>
Date: Tue, 21 Nov 2023 20:53:33 +0300
Subject: [PATCH] Force-unwrap file handles.
---
Sources/TSCBasic/FileSystem.swift | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift
index 3a63bdf..a1f3d9d 100644
--- a/Sources/TSCBasic/FileSystem.swift
+++ b/Sources/TSCBasic/FileSystem.swift
@@ -425,7 +425,7 @@ private class LocalFileSystem: FileSystem {
if fp == nil {
throw FileSystemError(errno: errno, path)
}
- defer { fclose(fp) }
+ defer { fclose(fp!) }
// Read the data one block at a time.
let data = BufferedOutputByteStream()
@@ -455,7 +455,7 @@ private class LocalFileSystem: FileSystem {
if fp == nil {
throw FileSystemError(errno: errno, path)
}
- defer { fclose(fp) }
+ defer { fclose(fp!) }
// Write the data in one chunk.
var contents = bytes.contents
--
2.42.0

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, callPackage
, fetchpatch
, cmake
, ninja
, git
@ -195,12 +196,22 @@ let
'';
};
# Part of this patch fixes for glibc 2.39: glibc patch 64b1a44183a3094672ed304532bedb9acc707554
# marks the `FILE*` argument to a few functions including `ferror` & `fread` as non-null. However
# the code passes an `Optional<T>` to these functions.
# This patch uses a `guard` which effectively unwraps the type (or throws an exception).
swift-tools-support-core-glibc-fix = fetchpatch {
url = "https://github.com/apple/swift-tools-support-core/commit/990afca47e75cce136d2f59e464577e68a164035.patch";
hash = "sha256-PLzWsp+syiUBHhEFS8+WyUcSae5p0Lhk7SSRdNvfouE=";
includes = [ "Sources/TSCBasic/FileSystem.swift" ];
};
swift-tools-support-core = mkBootstrapDerivation {
name = "swift-tools-support-core";
src = generated.sources.swift-tools-support-core;
patches = [
./patches/force-unwrap-file-handles.patch
swift-tools-support-core-glibc-fix
];
buildInputs = [
@ -389,7 +400,7 @@ in stdenv.mkDerivation (commonAttrs // {
swiftpmMakeMutable swift-tools-support-core
substituteInPlace .build/checkouts/swift-tools-support-core/Sources/TSCTestSupport/XCTestCasePerf.swift \
--replace 'canImport(Darwin)' 'false'
patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch}
patch -p1 -d .build/checkouts/swift-tools-support-core -i ${swift-tools-support-core-glibc-fix}
# Prevent a warning about SDK directories we don't have.
swiftpmMakeMutable swift-driver

View File

@ -1,33 +0,0 @@
From 8d9ab4b6ed24a97e8af0cc338a52aacdcf438b8c Mon Sep 17 00:00:00 2001
From: Pavel Sobolev <paveloom@riseup.net>
Date: Tue, 21 Nov 2023 20:53:33 +0300
Subject: [PATCH] Force-unwrap file handles.
---
Sources/TSCBasic/FileSystem.swift | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift
index 3a63bdf..a1f3d9d 100644
--- a/Sources/TSCBasic/FileSystem.swift
+++ b/Sources/TSCBasic/FileSystem.swift
@@ -425,7 +425,7 @@ private class LocalFileSystem: FileSystem {
if fp == nil {
throw FileSystemError(errno: errno, path)
}
- defer { fclose(fp) }
+ defer { fclose(fp!) }
// Read the data one block at a time.
let data = BufferedOutputByteStream()
@@ -455,7 +455,7 @@ private class LocalFileSystem: FileSystem {
if fp == nil {
throw FileSystemError(errno: errno, path)
}
- defer { fclose(fp) }
+ defer { fclose(fp!) }
// Write the data in one chunk.
var contents = bytes.contents
--
2.42.0

View File

@ -57,6 +57,7 @@ buildPythonPackage rec {
pythonRelaxDeps = [
"asttokens"
"packaging"
];
propagatedBuildInputs = [

View File

@ -8,7 +8,6 @@
let
callPackage = lua.pkgs.callPackage;
luaInterpreter = lua.interpreter;
in {
lua-setup-hook = LuaPathSearchPaths: LuaCPathSearchPaths:

View File

@ -13,11 +13,6 @@ nix_debug() {
addToLuaSearchPathWithCustomDelimiter() {
local varName="$1"
local absPattern="$2"
# delete longest match starting from the lua placeholder '?'
local topDir="${absPattern%%\?*}"
# export only if the folder exists else LUA_PATH/LUA_CPATH grow too large
if [[ ! -d "$topDir" ]]; then return; fi
# export only if we haven't already got this dir in the search path
if [[ ${!varName-} == *"$absPattern"* ]]; then return; fi
@ -27,7 +22,15 @@ addToLuaSearchPathWithCustomDelimiter() {
# allowing relative modules to be used even when there are system modules.
if [[ ! -v "${varName}" ]]; then export "${varName}=;;"; fi
# export only if the folder contains lua files
shopt -s globstar
for _file in ${absPattern/\?/\*\*}; do
export "${varName}=${!varName:+${!varName};}${absPattern}"
shopt -u globstar
return;
done
shopt -u globstar
}
addToLuaPath() {

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs:
let
luaPackages = self.pkgs;
luaversion = lib.versions.majorMinor version;
luaversion = lib.versions.majorMinor finalAttrs.version;
plat = if (stdenv.isLinux && lib.versionOlder self.luaversion "5.4") then "linux"
else if (stdenv.isLinux && lib.versionAtLeast self.luaversion "5.4") then "linux-readline"
@ -45,7 +45,7 @@ stdenv.mkDerivation (finalAttrs:
outputs = [ "out" "doc" ];
src = fetchurl {
url = "https://www.lua.org/ftp/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
url = "https://www.lua.org/ftp/lua-${finalAttrs.version}.tar.gz";
sha256 = hash;
};
@ -60,16 +60,11 @@ stdenv.mkDerivation (finalAttrs:
inherit patches;
# we can't pass flags to the lua makefile because for portability, everything is hardcoded
postPatch = ''
{
echo -e '
#undef LUA_PATH_DEFAULT
#define LUA_PATH_DEFAULT "./share/lua/${luaversion}/?.lua;./?.lua;./?/init.lua"
#undef LUA_CPATH_DEFAULT
#define LUA_CPATH_DEFAULT "./lib/lua/${luaversion}/?.so;./?.so;./lib/lua/${luaversion}/loadall.so"
'
} >> src/luaconf.h
sed -i "s@#define LUA_ROOT[[:space:]]*\"/usr/local/\"@#define LUA_ROOT \"$out/\"@g" src/luaconf.h
# abort if patching didn't work
grep $out src/luaconf.h
'' + lib.optionalString (!stdenv.isDarwin && !staticOnly) ''
# Add a target for a shared library to the Makefile.
sed -e '1s/^/LUA_SO = liblua.so/' \
@ -102,8 +97,8 @@ stdenv.mkDerivation (finalAttrs:
makeFlagsArray+=(${lib.optionalString stdenv.isDarwin "CC=\"$CC\""}${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) " 'AR=${stdenv.cc.targetPrefix}ar rcu'"})
installFlagsArray=( TO_BIN="lua luac" INSTALL_DATA='cp -d' \
TO_LIB="${if stdenv.isDarwin then "liblua.${version}.dylib"
else ("liblua.a" + lib.optionalString (!staticOnly) " liblua.so liblua.so.${luaversion} liblua.so.${version}" )}" )
TO_LIB="${if stdenv.isDarwin then "liblua.${finalAttrs.version}.dylib"
else ("liblua.a" + lib.optionalString (!staticOnly) " liblua.so liblua.so.${luaversion} liblua.so.${finalAttrs.version}" )}" )
runHook postConfigure
'';
@ -128,7 +123,7 @@ stdenv.mkDerivation (finalAttrs:
Name: Lua
Description: An Extensible Extension Language
Version: ${version}
Version: ${finalAttrs.version}
Requires:
Libs: -L$out/lib -llua
Cflags: -I$out/include
@ -138,7 +133,7 @@ stdenv.mkDerivation (finalAttrs:
ln -s "$out/lib/pkgconfig/lua.pc" "$out/lib/pkgconfig/lua${lib.replaceStrings [ "." ] [ "" ] luaversion}.pc"
# Make documentation outputs of different versions co-installable.
mv $out/share/doc/lua $out/share/doc/lua-${version}
mv $out/share/doc/lua $out/share/doc/lua-${finalAttrs.version}
'';
# copied from python

View File

@ -3,14 +3,14 @@
# Example:
# fail "It should have been but it wasn't to be"
function fail() {
echo "$1"
echo -e "$1"
exit 1
}
function assertStringEqual() {
if ! diff <(echo "$1") <(echo "$2") ; then
fail "expected \"$1\" to be equal to \"$2\""
fail "Actual value: \"$1\"\nExpected value: \"$2\""
fi
}

View File

@ -1,12 +1,10 @@
{ lua
, hello
, wrapLua
, lib, fetchFromGitHub
, fetchFromGitLab
, lib
, pkgs
}:
let
runTest = lua: { name, command }:
pkgs.runCommandLocal "test-${lua.name}-${name}" ({
nativeBuildInputs = [lua];
@ -31,16 +29,34 @@ let
luaWithModule = lua.withPackages(ps: [
ps.lua-cjson
]);
golden_LUA_PATHS = {
# Looking at lua interpreter 'setpath' code
# for instance https://github.com/lua/lua/blob/69ea087dff1daba25a2000dfb8f1883c17545b7a/loadlib.c#L599
# replace ";;" by ";LUA_PATH_DEFAULT;"
"5.1" = ";./?.lua;${lua}/share/lua/5.1/?.lua;${lua}/share/lua/5.1/?/init.lua;${lua}/lib/lua/5.1/?.lua;${lua}/lib/lua/5.1/?/init.lua;";
"5.2" = ";${lua}/share/lua/5.2/?.lua;${lua}/share/lua/5.2/?/init.lua;${lua}/lib/lua/5.2/?.lua;${lua}/lib/lua/5.2/?/init.lua;./?.lua;";
"5.3" = ";${lua}/share/lua/5.3/?.lua;${lua}/share/lua/5.3/?/init.lua;${lua}/lib/lua/5.3/?.lua;${lua}/lib/lua/5.3/?/init.lua;./?.lua;./?/init.lua;";
# lua5.4 seems to be smarter about it and dont add the lua separators when nothing left or right
"5.4" = "${lua}/share/lua/5.4/?.lua;${lua}/share/lua/5.4/?/init.lua;${lua}/lib/lua/5.4/?.lua;${lua}/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua";
# luajit versions
"2.0" = ";./?.lua;${lua}/share/luajit-2.0/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;${lua}/share/lua/5.1/?.lua;${lua}/share/lua/5.1/?/init.lua;";
"2.1" = ";./?.lua;${lua}/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;${lua}/share/lua/5.1/?.lua;${lua}/share/lua/5.1/?/init.lua;";
};
in
pkgs.recurseIntoAttrs ({
checkAliases = runTest lua {
name = "check-aliases";
checkInterpreterPatch = let
golden_LUA_PATH = golden_LUA_PATHS.${lib.versions.majorMinor lua.version};
in
runTest lua {
name = "check-default-lua-path";
command = ''
export LUA_PATH=";;"
generated=$(lua -e 'print(package.path)')
golden_LUA_PATH='./share/lua/${lua.luaversion}/?.lua;./?.lua;./?/init.lua'
assertStringContains "$generated" "$golden_LUA_PATH"
assertStringEqual "$generated" "${golden_LUA_PATH}"
'';
};

View File

@ -62,7 +62,7 @@ let
else buildPackages.stdenv;
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "luajit";
inherit version src;
@ -75,15 +75,6 @@ stdenv.mkDerivation rec {
# passed by nixpkgs CC wrapper is insufficient on its own
substituteInPlace src/Makefile --replace "#CCDEBUG= -g" "CCDEBUG= -g"
fi
{
echo -e '
#undef LUA_PATH_DEFAULT
#define LUA_PATH_DEFAULT "./share/lua/${luaversion}/?.lua;./?.lua;./?/init.lua"
#undef LUA_CPATH_DEFAULT
#define LUA_CPATH_DEFAULT "./lib/lua/${luaversion}/?.so;./?.so;./lib/lua/${luaversion}/loadall.so"
'
} >> src/luaconf.h
'';
dontConfigure = true;
@ -122,7 +113,8 @@ stdenv.mkDerivation rec {
inputs' = lib.filterAttrs (n: v: ! lib.isDerivation v && n != "passthruFun") inputs;
override = attr: let lua = attr.override (inputs' // { self = lua; }); in lua;
in passthruFun rec {
inherit self luaversion packageOverrides luaAttr;
inherit self packageOverrides luaAttr;
inherit (finalAttrs) luaversion;
executable = "lua";
luaOnBuildForBuild = override pkgsBuildBuild.${luaAttr};
luaOnBuildForHost = override pkgsBuildHost.${luaAttr};
@ -142,4 +134,4 @@ stdenv.mkDerivation rec {
];
maintainers = with maintainers; [ thoughtpolice smironov vcunat lblasc ];
} // extraMeta;
}
})

View File

@ -131,6 +131,12 @@ let
# * https://github.com/python/cpython/commit/e6b247c8e524
../3.7/no-win64-workaround.patch
# fix openssl detection by reverting irrelevant change for us, to enable hashlib which is required by pip
(fetchpatch {
url = "https://github.com/ActiveState/cpython/pull/35/commits/20ea5b46aaf1e7bdf9d6905ba8bece2cc73b05b0.patch";
revert = true;
hash = "sha256-Lp5fGlcfJJ6p6vKmcLckJiAA2AZz4prjFE0aMEJxotw=";
})
] ++ lib.optionals (x11Support && stdenv.isDarwin) [
./use-correct-tcl-tk-on-darwin.patch
@ -312,8 +318,6 @@ in with passthru; stdenv.mkDerivation ({
inherit passthru;
postFixup = ''
# Include a sitecustomize.py file. Note it causes an error when it's in postInstall with 2.7.
cp ${../../sitecustomize.py} $out/${sitePackages}/sitecustomize.py
'' + lib.optionalString strip2to3 ''
rm -R $out/bin/2to3 $out/lib/python*/lib2to3
'' + lib.optionalString stripConfig ''

View File

@ -537,8 +537,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
# Strip tests
rm -R $out/lib/python*/test $out/lib/python*/**/test{,s}
'' + optionalString includeSiteCustomize ''
# Include a sitecustomize.py file
cp ${../sitecustomize.py} $out/${sitePackages}/sitecustomize.py
'' + optionalString stripBytecode ''
# Determinism: deterministic bytecode
# First we delete all old bytecode.

View File

@ -35,9 +35,9 @@ in {
major = "2";
minor = "7";
patch = "18";
suffix = ".7"; # ActiveState's Python 2 extended support
suffix = ".8"; # ActiveState's Python 2 extended support
};
hash = "sha256-zcjAoSq6491ePiDySBCKrLIyYoO/5fdH6aBTNg/NH8s=";
hash = "sha256-HUOzu3uJbtd+3GbmGD35KOk/CDlwL4S7hi9jJGRFiqI=";
inherit (darwin) configd;
inherit passthruFun;
};

View File

@ -77,13 +77,12 @@ _pythonRemoveDeps() {
pythonRelaxDepsHook() {
pushd dist
# See https://peps.python.org/pep-0491/#escaping-and-unicode
local -r pkg_name="${pname//[^[:alnum:].]/_}"
local -r unpack_dir="unpacked"
local -r metadata_file="$unpack_dir/$pkg_name*/$pkg_name*.dist-info/METADATA"
local -r metadata_file="$unpack_dir/*/*.dist-info/METADATA"
# We generally shouldn't have multiple wheel files, but let's be safer here
for wheel in "$pkg_name"*".whl"; do
for wheel in *".whl"; do
PYTHONPATH="@wheel@/@pythonSitePackages@:$PYTHONPATH" \
@pythonInterpreter@ -m wheel unpack --dest "$unpack_dir" "$wheel"
rm -rf "$wheel"
@ -98,7 +97,7 @@ pythonRelaxDepsHook() {
fi
PYTHONPATH="@wheel@/@pythonSitePackages@:$PYTHONPATH" \
@pythonInterpreter@ -m wheel pack "$unpack_dir/$pkg_name"*
@pythonInterpreter@ -m wheel pack "$unpack_dir/"*
done
# Remove the folder since it will otherwise be in the dist output.

View File

@ -78,7 +78,7 @@ def test_requirement(requirement: Requirement) -> bool:
error(f"{package_name} not installed")
return False
if package.version not in requirement.specifier:
if requirement.specifier and package.version not in requirement.specifier:
error(
f"{package_name}{requirement.specifier} not satisfied by version {package.version}"
)
@ -91,7 +91,12 @@ if __name__ == "__main__":
args = argparser.parse_args()
metadata = get_metadata(args.wheel)
tests = [test_requirement(requirement) for requirement in metadata.requires_dist]
requirements = metadata.requires_dist
if not requirements:
sys.exit(0)
tests = [test_requirement(requirement) for requirement in requirements]
if not all(tests):
sys.exit(1)

View File

@ -126,9 +126,6 @@ in with passthru; stdenv.mkDerivation rec {
ln -s $out/${executable}-c/include $out/include/${libPrefix}
ln -s $out/${executable}-c/lib-python/${if isPy3k then "3" else pythonVersion} $out/lib/${libPrefix}
# Include a sitecustomize.py file
cp ${../sitecustomize.py} $out/${if isPy38OrNewer then sitePackages else "lib/${libPrefix}/${sitePackages}"}/sitecustomize.py
runHook postInstall
'';

View File

@ -95,9 +95,6 @@ in with passthru; stdenv.mkDerivation {
echo "Removing bytecode"
find . -name "__pycache__" -type d -depth -delete
# Include a sitecustomize.py file
cp ${../sitecustomize.py} $out/${sitePackages}/sitecustomize.py
runHook postInstall
'';

View File

@ -96,9 +96,6 @@ in with passthru; stdenv.mkDerivation {
echo "Removing bytecode"
find . -name "__pycache__" -type d -depth -delete
# Include a sitecustomize.py file
cp ${../sitecustomize.py} $out/${sitePackages}/sitecustomize.py
runHook postInstall
'';

View File

@ -1,39 +0,0 @@
"""
This is a Nix-specific module for discovering modules built with Nix.
The module recursively adds paths that are on `NIX_PYTHONPATH` to `sys.path`. In
order to process possible `.pth` files `site.addsitedir` is used.
The paths listed in `PYTHONPATH` are added to `sys.path` afterwards, but they
will be added before the entries we add here and thus take precedence.
Note the `NIX_PYTHONPATH` environment variable is unset in order to prevent leakage.
Similarly, this module listens to the environment variable `NIX_PYTHONEXECUTABLE`
and sets `sys.executable` to its value.
"""
import site
import sys
import os
import functools
paths = os.environ.pop('NIX_PYTHONPATH', None)
if paths:
functools.reduce(lambda k, p: site.addsitedir(p, k), paths.split(':'), site._init_pathinfo())
# Check whether we are in a venv or virtualenv.
# For Python 3 we check whether our `base_prefix` is different from our current `prefix`.
# For Python 2 we check whether the non-standard `real_prefix` is set.
# https://stackoverflow.com/questions/1871549/determine-if-python-is-running-inside-virtualenv
in_venv = (sys.version_info.major == 3 and sys.prefix != sys.base_prefix) or (sys.version_info.major == 2 and hasattr(sys, "real_prefix"))
if not in_venv:
executable = os.environ.pop('NIX_PYTHONEXECUTABLE', None)
prefix = os.environ.pop('NIX_PYTHONPREFIX', None)
if 'PYTHONEXECUTABLE' not in os.environ and executable is not None:
sys.executable = executable
if prefix is not None:
# Sysconfig does not like it when sys.prefix is set to None
sys.prefix = sys.exec_prefix = prefix
site.PREFIXES.insert(0, prefix)

View File

@ -39,11 +39,21 @@ let
is_virtualenv = "False";
};
} // lib.optionalAttrs (!python.isPyPy) {
# Use virtualenv from a Nix env.
nixenv-virtualenv = rec {
env = runCommand "${python.name}-virtualenv" {} ''
${pythonVirtualEnv.interpreter} -m virtualenv venv
mv venv $out
# Use virtualenv with symlinks from a Nix env.
nixenv-virtualenv-links = rec {
env = runCommand "${python.name}-virtualenv-links" {} ''
${pythonVirtualEnv.interpreter} -m virtualenv --system-site-packages --symlinks --no-seed $out
'';
interpreter = "${env}/bin/${python.executable}";
is_venv = "False";
is_nixenv = "True";
is_virtualenv = "True";
};
} // lib.optionalAttrs (!python.isPyPy) {
# Use virtualenv with copies from a Nix env.
nixenv-virtualenv-copies = rec {
env = runCommand "${python.name}-virtualenv-copies" {} ''
${pythonVirtualEnv.interpreter} -m virtualenv --system-site-packages --copies --no-seed $out
'';
interpreter = "${env}/bin/${python.executable}";
is_venv = "False";
@ -59,27 +69,48 @@ let
is_nixenv = "True";
is_virtualenv = "False";
};
} // lib.optionalAttrs (python.isPy3k && (!python.isPyPy)) {
# Venv built using plain Python
} // lib.optionalAttrs (python.pythonAtLeast "3.8" && (!python.isPyPy)) {
# Venv built using links to plain Python
# Python 2 does not support venv
# TODO: PyPy executable name is incorrect, it should be pypy-c or pypy-3c instead of pypy and pypy3.
plain-venv = rec {
env = runCommand "${python.name}-venv" {} ''
${python.interpreter} -m venv $out
plain-venv-links = rec {
env = runCommand "${python.name}-venv-links" {} ''
${python.interpreter} -m venv --system-site-packages --symlinks --without-pip $out
'';
interpreter = "${env}/bin/${python.executable}";
is_venv = "True";
is_nixenv = "False";
is_virtualenv = "False";
};
} // lib.optionalAttrs (python.pythonAtLeast "3.8" && (!python.isPyPy)) {
# Venv built using copies from plain Python
# Python 2 does not support venv
# TODO: PyPy executable name is incorrect, it should be pypy-c or pypy-3c instead of pypy and pypy3.
plain-venv-copies = rec {
env = runCommand "${python.name}-venv-copies" {} ''
${python.interpreter} -m venv --system-site-packages --copies --without-pip $out
'';
interpreter = "${env}/bin/${python.executable}";
is_venv = "True";
is_nixenv = "False";
is_virtualenv = "False";
};
} // lib.optionalAttrs (python.pythonAtLeast "3.8") {
# Venv built using Python Nix environment (python.buildEnv)
# TODO: Cannot create venv from a nix env
# Error: Command '['/nix/store/ddc8nqx73pda86ibvhzdmvdsqmwnbjf7-python3-3.7.6-venv/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
nixenv-venv = rec {
env = runCommand "${python.name}-venv" {} ''
${pythonEnv.interpreter} -m venv $out
nixenv-venv-links = rec {
env = runCommand "${python.name}-venv-links" {} ''
${pythonEnv.interpreter} -m venv --system-site-packages --symlinks --without-pip $out
'';
interpreter = "${env}/bin/${pythonEnv.executable}";
is_venv = "True";
is_nixenv = "True";
is_virtualenv = "False";
};
} // lib.optionalAttrs (python.pythonAtLeast "3.8") {
# Venv built using Python Nix environment (python.buildEnv)
nixenv-venv-copies = rec {
env = runCommand "${python.name}-venv-copies" {} ''
${pythonEnv.interpreter} -m venv --system-site-packages --copies --without-pip $out
'';
interpreter = "${env}/bin/${pythonEnv.executable}";
is_venv = "True";
@ -91,11 +122,33 @@ let
testfun = name: attrs: runCommand "${python.name}-tests-${name}" ({
inherit (python) pythonVersion;
} // attrs) ''
mkdir $out
# set up the test files
cp -r ${./tests/test_environments} tests
chmod -R +w tests
substituteAllInPlace tests/test_python.py
${attrs.interpreter} -m unittest discover --verbose tests #/test_python.py
mkdir $out
# run the tests by invoking the interpreter via full path
echo "absolute path: ${attrs.interpreter}"
${attrs.interpreter} -m unittest discover --verbose tests 2>&1 | tee "$out/full.txt"
# run the tests by invoking the interpreter via $PATH
export PATH="$(dirname ${attrs.interpreter}):$PATH"
echo "PATH: $(basename ${attrs.interpreter})"
"$(basename ${attrs.interpreter})" -m unittest discover --verbose tests 2>&1 | tee "$out/path.txt"
# make sure we get the right path when invoking through a result link
ln -s "${attrs.env}" result
relative="result/bin/$(basename ${attrs.interpreter})"
expected="$PWD/$relative"
actual="$(./$relative -c "import sys; print(sys.executable)" | tee "$out/result.txt")"
if [ "$actual" != "$expected" ]; then
echo "expected $expected, got $actual"
exit 1
fi
# if we got this far, the tests passed
touch $out/success
'';

View File

@ -38,7 +38,7 @@ class TestCasePython(unittest.TestCase):
@unittest.skipIf(IS_PYPY or sys.version_info.major==2, "Python 2 does not have base_prefix")
def test_base_prefix(self):
if IS_VENV or IS_NIXENV or IS_VIRTUALENV:
if IS_VENV or IS_VIRTUALENV:
self.assertNotEqual(sys.prefix, sys.base_prefix)
else:
self.assertEqual(sys.prefix, sys.base_prefix)

View File

@ -35,6 +35,8 @@ let
fi
mkdir -p "$out/bin"
rm -f $out/bin/.*-wrapped
for path in ${lib.concatStringsSep " " paths}; do
if [ -d "$path/bin" ]; then
cd "$path/bin"
@ -42,7 +44,13 @@ let
if [ -f "$prg" ]; then
rm -f "$out/bin/$prg"
if [ -x "$prg" ]; then
makeWrapper "$path/bin/$prg" "$out/bin/$prg" --set NIX_PYTHONPREFIX "$out" --set NIX_PYTHONEXECUTABLE ${pythonExecutable} --set NIX_PYTHONPATH ${pythonPath} ${lib.optionalString (!permitUserSite) ''--set PYTHONNOUSERSITE "true"''} ${lib.concatStringsSep " " makeWrapperArgs}
if [ -f ".$prg-wrapped" ]; then
echo "#!${pythonExecutable}" > "$out/bin/$prg"
sed -e '1d' -e '3d' ".$prg-wrapped" >> "$out/bin/$prg"
chmod +x "$out/bin/$prg"
else
makeWrapper "$path/bin/$prg" "$out/bin/$prg" --inherit-argv0 --resolve-argv0 ${lib.optionalString (!permitUserSite) ''--set PYTHONNOUSERSITE "true"''} ${lib.concatStringsSep " " makeWrapperArgs}
fi
fi
fi
done

View File

@ -1,10 +1,16 @@
addSDLPath () {
if [ -e "$1/include/SDL" ]; then
export SDL_PATH="${SDL_PATH-}${SDL_PATH:+ }$1/include/SDL"
fi
# NB this doesnt work with split dev packages because different packages
# will contain "include/SDL/" and "lib/" directories.
#
# However the SDL_LIB_PATH is consumed by SDL itself and serves to locate
# libraries like SDL_mixer, SDL_image, etc which are not split-package
# so the check above will only trigger on them.
if [ -e "$1/lib" ]; then
export SDL_LIB_PATH="${SDL_LIB_PATH-}${SDL_LIB_PATH:+ }-L$1/lib"
fi
fi
}
addEnvHooks "$hostOffset" addSDLPath

View File

@ -16,11 +16,11 @@
stdenv.mkDerivation rec {
pname = "Xaw3d";
version = "1.6.5";
version = "1.6.6";
src = fetchurl {
url = "https://www.x.org/releases/individual/lib/libXaw3d-${version}.tar.xz";
sha256 = "sha256-NIHuS2dTuI4YhW6iZcuE8rAznujDu+yWaxVrOLWEGDM=";
sha256 = "sha256-pBw+NxNa1hax8ou95wACr788tZow3zQUH4KdMurchkY=";
};
dontUseImakeConfigure = true;
nativeBuildInputs = [ pkg-config bison flex imake gccmakedep ];

View File

@ -23,14 +23,14 @@
stdenv.mkDerivation rec {
pname = "at-spi2-core";
version = "2.50.1";
version = "2.50.2";
outputs = [ "out" "dev" ];
separateDebugInfo = true;
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "Vye1wGh6xXuoBA55vWcxtxSja4/PMhkPI2uPs2mHiec=";
hash = "sha256-W4GxRhpi3Y++0aJ2+p71txEvmuX/huHjKtlkS2VP94w=";
};
nativeBuildInputs = [

View File

@ -26,13 +26,13 @@ assert useVulkan -> withExamples;
stdenv.mkDerivation rec {
pname = "dav1d";
version = "1.4.0";
version = "1.4.1";
src = fetchFromGitHub {
owner = "videolan";
repo = pname;
rev = version;
hash = "sha256-NDv4ZlmrbRoecd0qj/sy+camn4uRTrvte4/84L6oUUg=";
hash = "sha256-PBFQrGGP7hKNMuwkl7q/7/C7v41xqdOYW+pJ70fI4Uo=";
};
outputs = [ "out" "dev" ];

View File

@ -11,13 +11,13 @@
stdenv.mkDerivation rec {
pname = "edencommon";
version = "2024.01.22.00";
version = "2024.03.11.00";
src = fetchFromGitHub {
owner = "facebookexperimental";
repo = "edencommon";
rev = "v${version}";
sha256 = "sha256-KY0vXptzOEJLDjHvGd3T5oiCCvggND2bPBzvll+YBo4=";
sha256 = "sha256-1z4QicS98juv4bUEbHBkCjVJHEhnoJyLYp4zMHmDbMg=";
};
nativeBuildInputs = [ cmake ];

View File

@ -1,252 +0,0 @@
diff --git a/lib/internal.h b/lib/internal.h
index cce71e4c..a217b3f9 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -31,7 +31,7 @@
Copyright (c) 2016-2023 Sebastian Pipping <sebastian@pipping.org>
Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
- Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild@sony.com>
+ Copyright (c) 2023-2024 Sony Corporation / Snild Dolkow <snild@sony.com>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
@@ -162,7 +162,7 @@ const char *unsignedCharToPrintable(unsigned char c);
#endif
extern XML_Bool g_reparseDeferralEnabledDefault; // written ONLY in runtests.c
-extern unsigned int g_parseAttempts; // used for testing only
+extern unsigned int g_bytesScanned; // used for testing only
#ifdef __cplusplus
}
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
index aaf0fa9c..6de99d99 100644
--- a/lib/xmlparse.c
+++ b/lib/xmlparse.c
@@ -38,7 +38,7 @@
Copyright (c) 2022 Jann Horn <jannh@google.com>
Copyright (c) 2022 Sean McBride <sean@rogue-research.com>
Copyright (c) 2023 Owain Davies <owaind@bath.edu>
- Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild@sony.com>
+ Copyright (c) 2023-2024 Sony Corporation / Snild Dolkow <snild@sony.com>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
@@ -630,7 +630,7 @@ static unsigned long getDebugLevel(const char *variableName,
: ((*((pool)->ptr)++ = c), 1))
XML_Bool g_reparseDeferralEnabledDefault = XML_TRUE; // write ONLY in runtests.c
-unsigned int g_parseAttempts = 0; // used for testing only
+unsigned int g_bytesScanned = 0; // used for testing only
struct XML_ParserStruct {
/* The first member must be m_userData so that the XML_GetUserData
@@ -1017,7 +1017,7 @@ callProcessor(XML_Parser parser, const char *start, const char *end,
return XML_ERROR_NONE;
}
}
- g_parseAttempts += 1;
+ g_bytesScanned += (unsigned)have_now;
const enum XML_Error ret = parser->m_processor(parser, start, end, endPtr);
if (ret == XML_ERROR_NONE) {
// if we consumed nothing, remember what we had on this parse attempt.
diff --git a/tests/basic_tests.c b/tests/basic_tests.c
index 7112a440..a9cc3861 100644
--- a/tests/basic_tests.c
+++ b/tests/basic_tests.c
@@ -5202,13 +5202,7 @@ START_TEST(test_nested_entity_suspend) {
END_TEST
/* Regression test for quadratic parsing on large tokens */
-START_TEST(test_big_tokens_take_linear_time) {
- const char *const too_slow_failure_message
- = "Compared to the baseline runtime of the first test, this test has a "
- "slowdown of more than <max_slowdown>. "
- "Please keep increasing the value by 1 until it reliably passes the "
- "test on your hardware and open a bug sharing that number with us. "
- "Thanks in advance!";
+START_TEST(test_big_tokens_scale_linearly) {
const struct {
const char *pre;
const char *post;
@@ -5220,65 +5214,57 @@ START_TEST(test_big_tokens_take_linear_time) {
{"<e><", "/></e>"}, // big elem name, used to be O(N²)
};
const int num_cases = sizeof(text) / sizeof(text[0]);
- // For the test we need a <max_slowdown> value that is:
- // (1) big enough that the test passes reliably (avoiding flaky tests), and
- // (2) small enough that the test actually catches regressions.
- const int max_slowdown = 15;
char aaaaaa[4096];
const int fillsize = (int)sizeof(aaaaaa);
const int fillcount = 100;
+ const unsigned approx_bytes = fillsize * fillcount; // ignore pre/post.
+ const unsigned max_factor = 4;
+ const unsigned max_scanned = max_factor * approx_bytes;
memset(aaaaaa, 'a', fillsize);
if (! g_reparseDeferralEnabledDefault) {
return; // heuristic is disabled; we would get O(n^2) and fail.
}
-#if ! defined(__linux__)
- if (CLOCKS_PER_SEC < 100000) {
- // Skip this test if clock() doesn't have reasonably good resolution.
- // This workaround is primarily targeting Windows and FreeBSD, since
- // XSI requires the value to be 1.000.000 (10x the condition here), and
- // we want to be very sure that at least one platform in CI can catch
- // regressions (through a failing test).
- return;
- }
-#endif
- clock_t baseline = 0;
for (int i = 0; i < num_cases; ++i) {
XML_Parser parser = XML_ParserCreate(NULL);
assert_true(parser != NULL);
enum XML_Status status;
- set_subtest("max_slowdown=%d text=\"%saaaaaa%s\"", max_slowdown,
- text[i].pre, text[i].post);
- const clock_t start = clock();
+ set_subtest("text=\"%saaaaaa%s\"", text[i].pre, text[i].post);
// parse the start text
+ g_bytesScanned = 0;
status = _XML_Parse_SINGLE_BYTES(parser, text[i].pre,
(int)strlen(text[i].pre), XML_FALSE);
if (status != XML_STATUS_OK) {
xml_failure(parser);
}
+
// parse lots of 'a', failing the test early if it takes too long
+ unsigned past_max_count = 0;
for (int f = 0; f < fillcount; ++f) {
status = _XML_Parse_SINGLE_BYTES(parser, aaaaaa, fillsize, XML_FALSE);
if (status != XML_STATUS_OK) {
xml_failure(parser);
}
- // i == 0 means we're still calculating the baseline value
- if (i > 0) {
- const clock_t now = clock();
- const clock_t clocks_so_far = now - start;
- const int slowdown = clocks_so_far / baseline;
- if (slowdown >= max_slowdown) {
- fprintf(
- stderr,
- "fill#%d: clocks_so_far=%d baseline=%d slowdown=%d max_slowdown=%d\n",
- f, (int)clocks_so_far, (int)baseline, slowdown, max_slowdown);
- fail(too_slow_failure_message);
- }
+ if (g_bytesScanned > max_scanned) {
+ // We're not done, and have already passed the limit -- the test will
+ // definitely fail. This block allows us to save time by failing early.
+ const unsigned pushed
+ = (unsigned)strlen(text[i].pre) + (f + 1) * fillsize;
+ fprintf(
+ stderr,
+ "after %d/%d loops: pushed=%u scanned=%u (factor ~%.2f) max_scanned: %u (factor ~%u)\n",
+ f + 1, fillcount, pushed, g_bytesScanned,
+ g_bytesScanned / (double)pushed, max_scanned, max_factor);
+ past_max_count++;
+ // We are failing, but allow a few log prints first. If we don't reach
+ // a count of five, the test will fail after the loop instead.
+ assert_true(past_max_count < 5);
}
}
+
// parse the end text
status = _XML_Parse_SINGLE_BYTES(parser, text[i].post,
(int)strlen(text[i].post), XML_TRUE);
@@ -5286,18 +5272,14 @@ START_TEST(test_big_tokens_take_linear_time) {
xml_failure(parser);
}
- // how long did it take in total?
- const clock_t end = clock();
- const clock_t taken = end - start;
- if (i == 0) {
- assert_true(taken > 0); // just to make sure we don't div-by-0 later
- baseline = taken;
- }
- const int slowdown = taken / baseline;
- if (slowdown >= max_slowdown) {
- fprintf(stderr, "taken=%d baseline=%d slowdown=%d max_slowdown=%d\n",
- (int)taken, (int)baseline, slowdown, max_slowdown);
- fail(too_slow_failure_message);
+ assert_true(g_bytesScanned > approx_bytes); // or the counter isn't working
+ if (g_bytesScanned > max_scanned) {
+ fprintf(
+ stderr,
+ "after all input: scanned=%u (factor ~%.2f) max_scanned: %u (factor ~%u)\n",
+ g_bytesScanned, g_bytesScanned / (double)approx_bytes, max_scanned,
+ max_factor);
+ fail("scanned too many bytes");
}
XML_ParserFree(parser);
@@ -5774,19 +5756,17 @@ START_TEST(test_varying_buffer_fills) {
fillsize[2], fillsize[3]);
XML_Parser parser = XML_ParserCreate(NULL);
assert_true(parser != NULL);
- g_parseAttempts = 0;
CharData storage;
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
XML_SetStartElementHandler(parser, start_element_event_handler);
+ g_bytesScanned = 0;
int worstcase_bytes = 0; // sum of (buffered bytes at each XML_Parse call)
- int scanned_bytes = 0; // sum of (buffered bytes at each actual parse)
int offset = 0;
while (*fillsize >= 0) {
assert_true(offset + *fillsize <= document_length); // or test is invalid
- const unsigned attempts_before = g_parseAttempts;
const enum XML_Status status
= XML_Parse(parser, &document[offset], *fillsize, XML_FALSE);
if (status != XML_STATUS_OK) {
@@ -5796,28 +5776,20 @@ START_TEST(test_varying_buffer_fills) {
fillsize++;
assert_true(offset <= INT_MAX - worstcase_bytes); // avoid overflow
worstcase_bytes += offset; // we might've tried to parse all pending bytes
- if (g_parseAttempts != attempts_before) {
- assert_true(g_parseAttempts == attempts_before + 1); // max 1/XML_Parse
- assert_true(offset <= INT_MAX - scanned_bytes); // avoid overflow
- scanned_bytes += offset; // we *did* try to parse all pending bytes
- }
}
assert_true(storage.count == 1); // the big token should've been parsed
- assert_true(scanned_bytes > 0); // test-the-test: does our counter work?
+ assert_true(g_bytesScanned > 0); // test-the-test: does our counter work?
if (g_reparseDeferralEnabledDefault) {
// heuristic is enabled; some XML_Parse calls may have deferred reparsing
- const int max_bytes_scanned = -*fillsize;
- if (scanned_bytes > max_bytes_scanned) {
+ const unsigned max_bytes_scanned = -*fillsize;
+ if (g_bytesScanned > max_bytes_scanned) {
fprintf(stderr,
- "bytes scanned in parse attempts: actual=%d limit=%d \n",
- scanned_bytes, max_bytes_scanned);
+ "bytes scanned in parse attempts: actual=%u limit=%u \n",
+ g_bytesScanned, max_bytes_scanned);
fail("too many bytes scanned in parse attempts");
}
- assert_true(scanned_bytes <= worstcase_bytes);
- } else {
- // heuristic is disabled; every XML_Parse() will have reparsed
- assert_true(scanned_bytes == worstcase_bytes);
}
+ assert_true(g_bytesScanned <= (unsigned)worstcase_bytes);
XML_ParserFree(parser);
}
@@ -6065,7 +6037,7 @@ make_basic_test_case(Suite *s) {
tcase_add_test__ifdef_xml_dtd(tc_basic,
test_pool_integrity_with_unfinished_attr);
tcase_add_test__if_xml_ge(tc_basic, test_nested_entity_suspend);
- tcase_add_test(tc_basic, test_big_tokens_take_linear_time);
+ tcase_add_test(tc_basic, test_big_tokens_scale_linearly);
tcase_add_test(tc_basic, test_set_reparse_deferral);
tcase_add_test(tc_basic, test_reparse_deferral_is_inherited);
tcase_add_test(tc_basic, test_set_reparse_deferral_on_null_parser);

View File

@ -16,7 +16,7 @@
# files.
let
version = "2.6.0";
version = "2.6.2";
tag = "R_${lib.replaceStrings ["."] ["_"] version}";
in
stdenv.mkDerivation (finalAttrs: {
@ -25,14 +25,9 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchurl {
url = with finalAttrs; "https://github.com/libexpat/libexpat/releases/download/${tag}/${pname}-${version}.tar.xz";
hash = "sha256-y19ajqIR4cq9Wb4KkzpS48Aswyboak04fY0hjn7kej4=";
hash = "sha256-7hS0xdiQixvsN62TdgfqsYPU2YBqCK3uRyw8MSHSc2Q=";
};
patches = [
# Fix tests flakiness on some platforms (like aarch64-darwin), should be released in 2.6.1
./2.6.0-fix-tests-flakiness.patch
];
strictDeps = true;
outputs = [ "out" "dev" ]; # TODO: fix referrers

View File

@ -15,13 +15,13 @@
stdenv.mkDerivation rec {
pname = "fb303";
version = "2024.01.22.00";
version = "2024.03.11.00";
src = fetchFromGitHub {
owner = "facebook";
repo = "fb303";
rev = "v${version}";
sha256 = "sha256-EQpe0REGWUpYg+llsCo4x6vJ7UPdWXk3uPM3b8b9Uf0=";
sha256 = "sha256-Jtztb8CTqvRdRjUa3jaouP5PFAwoM4rKLIfgvOyXUIg=";
};
nativeBuildInputs = [ cmake ];

View File

@ -23,13 +23,13 @@
stdenv.mkDerivation rec {
pname = "fbthrift";
version = "2024.01.22.00";
version = "2024.03.11.00";
src = fetchFromGitHub {
owner = "facebook";
repo = "fbthrift";
rev = "v${version}";
sha256 = "sha256-vIYXX4NOs2JdhrAJKmIhf4+hQEXHue2Ok7e4cw6yups=";
sha256 = "sha256-iCiiKNDlfKm1Y4SGzcSP6o/OdiRRrj9UEawW6qpBpSY=";
};
nativeBuildInputs = [
@ -38,7 +38,9 @@ stdenv.mkDerivation rec {
flex
];
cmakeFlags = lib.optionals stdenv.isDarwin [
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if stdenv.isDarwin then "OFF" else "ON"}"
] ++ lib.optionals stdenv.isDarwin [
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
];

View File

@ -30,7 +30,7 @@
, withFullDeps ? ffmpegVariant == "full"
, fetchgit
, fetchpatch
, fetchpatch2
# Feature flags
, withAlsa ? withHeadlessDeps && stdenv.isLinux # Alsa in/output supporT
@ -101,6 +101,7 @@
, withVmaf ? withFullDeps && !stdenv.isAarch64 && lib.versionAtLeast version "5" # Netflix's VMAF (Video Multi-Method Assessment Fusion)
, withVoAmrwbenc ? withFullDeps && withVersion3 # AMR-WB encoder
, withVorbis ? withHeadlessDeps # Vorbis de/encoding, native encoder exists
, withVpl ? false # Hardware acceleration via intel libvpl
, withVpx ? withHeadlessDeps && stdenv.buildPlatform == stdenv.hostPlatform # VP8 & VP9 de/encoding
, withVulkan ? withSmallDeps && !stdenv.isDarwin
, withWebp ? withFullDeps # WebP encoder
@ -147,7 +148,7 @@
* Program options
*/
, buildFfmpeg ? withHeadlessDeps # Build ffmpeg executable
, buildFfplay ? withFullDeps # Build ffplay executable
, buildFfplay ? withSmallDeps # Build ffplay executable
, buildFfprobe ? withHeadlessDeps # Build ffprobe executable
, buildQtFaststart ? withFullDeps # Build qt-faststart executable
, withBin ? buildFfmpeg || buildFfplay || buildFfprobe || buildQtFaststart
@ -246,6 +247,7 @@
, libvdpau
, libvmaf
, libvorbis
, libvpl
, libvpx
, libwebp
, libX11
@ -328,6 +330,7 @@ assert withGPLv3 -> withGPL && withVersion3;
* Build dependencies
*/
assert withPixelutils -> buildAvutil;
assert !(withMfx && withVpl); # incompatible features
/*
* Program dependencies
*/
@ -365,25 +368,25 @@ stdenv.mkDerivation (finalAttrs: {
--replace /usr/local/lib/frei0r-1 ${frei0r}/lib/frei0r-1
'';
patches = map (patch: fetchpatch patch) ([ ]
patches = map (patch: fetchpatch2 patch) ([ ]
++ optionals (versionOlder version "5") [
{
name = "libsvtav1-1.5.0-compat-compressed_ten_bit_format.patch";
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/031f1561cd286596cdb374da32f8aa816ce3b135";
hash = "sha256-mSnmAkoNikDpxcN+A/hpB7mUbbtcMvm4tG6gZFuroe8=";
hash = "sha256-agJgzIzrBTQBAypuCmGXXFo7vw6Iodw5Ny5O5QCKCn8=";
}
{
# Backport fix for binutils-2.41.
name = "binutils-2.41.patch";
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb";
hash = "sha256-vlBUMJ1bORQHRNpuzc5iXsTWwS/CN5BmGIA8g7H7mJE=";
hash = "sha256-vLSltvZVMcQ0CnkU0A29x6fJSywE8/aU+Mp9os8DZYY=";
}
# The upstream patch isnt for ffmpeg 4, but it will apply with a few tweaks.
# Fixes a crash when built with clang 16 due to UB in ff_seek_frame_binary.
{
name = "utils-fix_crash_in_ff_seek_frame_binary.patch";
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/ab792634197e364ca1bb194f9abe36836e42f12d";
hash = "sha256-UxZ4VneZpw+Q/UwkEUDNdb2nOx1QnMrZ40UagspNTxI=";
hash = "sha256-vqqVACjbCcGL9Qvmg1QArSKqVmOqr8BEr+OxTBDt6mA=";
postFetch = ''
substituteInPlace "$out" \
--replace libavformat/seek.c libavformat/utils.c \
@ -391,20 +394,18 @@ stdenv.mkDerivation (finalAttrs: {
'';
}
]
++ (lib.optional (lib.versionAtLeast version "6" && lib.versionOlder version "6.1")
{ # this can be removed post 6.1
name = "fix_aacps_tablegen";
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/814178f92647be2411516bbb82f48532373d2554";
hash = "sha256-FQV9/PiarPXCm45ldtCsxGHjlrriL8DKpn1LaKJ8owI=";
}
)
++ (lib.optional (lib.versionAtLeast version "6.1" && lib.versionOlder version "6.2")
++ (lib.optionals (lib.versionAtLeast version "6.1" && lib.versionOlder version "6.2") [
{ # this can be removed post 6.1
name = "fix_build_failure_due_to_PropertyKey_EncoderID";
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/cb049d377f54f6b747667a93e4b719380c3e9475";
hash = "sha256-Ittka0mId1N/BwJ0FQ0ygpTSS6Y11u2SjWDpbGN+KXo=";
hash = "sha256-sxRXKKgUak5vsQTiV7ge8vp+N22CdTIvuczNgVRP72c=";
}
));
{
name = "fix_vulkan_av1";
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/e06ce6d2b45edac4a2df04f304e18d4727417d24";
hash = "sha256-73mlX1rdJrguw7OXaSItfHtI7gflDrFj+7SepVvvUIg=";
}
]));
configurePlatforms = [];
setOutputFlags = false; # Only accepts some of them
@ -561,6 +562,9 @@ stdenv.mkDerivation (finalAttrs: {
(enableFeature withV4l2M2m "v4l2-m2m")
(enableFeature withVaapi "vaapi")
(enableFeature withVdpau "vdpau")
] ++ optionals (versionAtLeast version "6.0") [
(enableFeature withVpl "libvpl")
] ++ [
(enableFeature withVidStab "libvidstab") # Actual min. version 2.0
(enableFeature withVmaf "libvmaf")
(enableFeature withVoAmrwbenc "libvo-amrwbenc")
@ -676,6 +680,7 @@ stdenv.mkDerivation (finalAttrs: {
++ optionals withVmaf [ libvmaf ]
++ optionals withVoAmrwbenc [ vo-amrwbenc ]
++ optionals withVorbis [ libvorbis ]
++ optionals withVpl [ libvpl ]
++ optionals withVpx [ libvpx ]
++ optionals withVulkan [ vulkan-headers vulkan-loader ]
++ optionals withWebp [ libwebp ]

View File

@ -19,13 +19,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "fizz";
version = "2024.01.22.00";
version = "2024.03.11.00";
src = fetchFromGitHub {
owner = "facebookincubator";
repo = "fizz";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-17EELvRrWhUprxvm1Ur0FYNimvY1qgK0YH8ehxtLpxM=";
hash = "sha256-IHWotiVUjGOvebXy4rwsh8U8UMxTrF1VaqXzZMjojiM=";
};
nativeBuildInputs = [ cmake ];

View File

@ -1,5 +1,6 @@
{ lib
, stdenv
, overrideSDK
, fetchFromGitHub
, boost
, cmake
@ -26,13 +27,13 @@
stdenv.mkDerivation rec {
pname = "folly";
version = "2024.01.22.00";
version = "2024.03.11.00";
src = fetchFromGitHub {
owner = "facebook";
repo = "folly";
rev = "v${version}";
sha256 = "sha256-+z1wuEOgr7CMHFnOn5gLm9mtVH7mVURLstOoDqzxKbk=";
sha256 = "sha256-INvWTw27fmVbKQIT9ebdRGMCOIzpc/NepRN2EnKLJx0=";
};
nativeBuildInputs = [
@ -72,6 +73,8 @@ stdenv.mkDerivation rec {
# see https://github.com/NixOS/nixpkgs/issues/144170
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
] ++ lib.optional (stdenv.isDarwin && stdenv.isx86_64) [
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13"
];
# split outputs to reduce downstream closure sizes

View File

@ -19,13 +19,13 @@
stdenv.mkDerivation rec {
pname = "glib-networking";
version = "2.78.0";
version = "2.78.1";
outputs = [ "out" "installedTests" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "Uv5M6T99xRM0sQKJRZmFjSPIplrEoRELMJIFZdaNOro=";
sha256 = "5I8t27BJgyy7CSMFKcXkXayp8N8O2jJfgy9zeYWb8J8=";
};
patches = [
@ -35,6 +35,12 @@ stdenv.mkDerivation rec {
})
./installed-tests-path.patch
# pkcs11 tests provide a relative path that gnutls of course isn't able to
# load, resulting in test failures
# https://gitlab.gnome.org/GNOME/glib-networking/-/blob/2.78.1/tls/tests/certificate.c#L926
# https://gitlab.gnome.org/GNOME/glib-networking/-/blob/2.78.1/tls/tests/connection.c#L3380
./disable-pkcs11-tests.patch
];
strictDeps = true;

View File

@ -0,0 +1,13 @@
diff --git a/meson.build b/meson.build
index 0b3b8c0..7f6ce09 100644
--- a/meson.build
+++ b/meson.build
@@ -86,7 +86,7 @@ if gnutls_dep.found()
backends += ['gnutls']
# test-specific, maybe move to tls/tests
if cc.has_function('gnutls_pkcs11_init', prefix: '#include <gnutls/pkcs11.h>', dependencies: gnutls_dep)
- config_h.set10('HAVE_GNUTLS_PKCS11', true)
+ config_h.set10('HAVE_GNUTLS_PKCS11', false)
endif
endif

View File

@ -1,4 +1,4 @@
From cdd0c4b168fe228de97778556cea5c0f936e0e79 Mon Sep 17 00:00:00 2001
From e207c3dbcff1d3d09c60eec99b6fec2a698b01bd Mon Sep 17 00:00:00 2001
From: Bernardo Meurer <bernardo@meurer.org>
Date: Fri, 22 Jul 2022 22:11:07 -0700
Subject: [PATCH] Revert "Remove all usage of @BASH@ or ${BASH} in installed
@ -22,10 +22,10 @@ Co-authored-by: Maximilian Bosch <maximilian@mbosch.me>
8 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/debug/Makefile b/debug/Makefile
index 52f9a7852c..22e4ae5461 100644
index 3903cc97a3..b041acca71 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -265,8 +265,9 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
@@ -343,8 +343,9 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
$(objpfx)xtrace: xtrace.sh
rm -f $@.new
@ -38,20 +38,20 @@ index 52f9a7852c..22e4ae5461 100644
&& rm -f $@ && mv $@.new $@ && chmod +x $@
diff --git a/debug/xtrace.sh b/debug/xtrace.sh
index 3d1f2af43a..eb2ba7ad4a 100755
index 77ec1d84df..5614404a71 100755
--- a/debug/xtrace.sh
+++ b/debug/xtrace.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#! @BASH@
# Copyright (C) 1999-2023 Free Software Foundation, Inc.
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
diff --git a/elf/Makefile b/elf/Makefile
index 0d19964d42..ee8ee1cd41 100644
index 5d78b659ce..a2145d7b64 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -250,7 +250,8 @@ $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \
@@ -249,7 +249,8 @@ $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \
$(common-objpfx)libc_nonshared.a
$(objpfx)sotruss: sotruss.sh $(common-objpfx)config.make
@ -61,7 +61,7 @@ index 0d19964d42..ee8ee1cd41 100644
-e 's%@TEXTDOMAINDIR@%$(localedir)%g' \
-e 's%@PREFIX@%$(prefix)%g' \
-e 's|@PKGVERSION@|$(PKGVERSION)|g' \
@@ -1396,6 +1397,7 @@ ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
@@ -1392,6 +1393,7 @@ ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
-e 's%@VERSION@%$(version)%g' \
-e 's|@PKGVERSION@|$(PKGVERSION)|g' \
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
@ -70,30 +70,30 @@ index 0d19964d42..ee8ee1cd41 100644
ifeq ($(ldd-rewrite-script),no)
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index e45dec5894..e09428506e 100644
index d6b640df66..46111670cd 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#! @BASH@
# Copyright (C) 1996-2023 Free Software Foundation, Inc.
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
diff --git a/elf/sotruss.sh b/elf/sotruss.sh
index 874a6bed3f..7cc154561e 100755
index ac1a83984e..2bf17c518e 100755
--- a/elf/sotruss.sh
+++ b/elf/sotruss.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#! @BASH@
# Copyright (C) 2011-2023 Free Software Foundation, Inc.
# Copyright (C) 2011-2024 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
diff --git a/malloc/Makefile b/malloc/Makefile
index dfb51d344c..574b5e9579 100644
index c83ade5f10..8dd9174b79 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -306,8 +306,9 @@ $(objpfx)mtrace: mtrace.pl
@@ -312,8 +312,9 @@ $(objpfx)mtrace: mtrace.pl
$(objpfx)memusage: memusage.sh
rm -f $@.new
@ -106,17 +106,17 @@ index dfb51d344c..574b5e9579 100644
&& rm -f $@ && mv $@.new $@ && chmod +x $@
diff --git a/malloc/memusage.sh b/malloc/memusage.sh
index b1f5848b74..329e36ef8a 100755
index d2d9d17ea8..2e7efc9049 100755
--- a/malloc/memusage.sh
+++ b/malloc/memusage.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#! @BASH@
# Copyright (C) 1999-2023 Free Software Foundation, Inc.
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
diff --git a/timezone/Makefile b/timezone/Makefile
index 0306c0bca9..de9bbcc815 100644
index d7acb387ba..c8e203ea3a 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -132,7 +132,8 @@ $(testdata)/XT5: testdata/gen-XT5.sh
@ -130,5 +130,5 @@ index 0306c0bca9..de9bbcc815 100644
-e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
-e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \
--
2.38.4
2.42.0

View File

@ -0,0 +1,566 @@
commit 6d1e3fb07b45e2e31e469b16cf21b24bccf8914c
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date: Wed Jan 31 02:12:43 2024 +0100
Replace advisories directory
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
diff --git a/ADVISORIES b/ADVISORIES
new file mode 100644
index 0000000000..d4e33f2df3
--- /dev/null
+++ b/ADVISORIES
@@ -0,0 +1,2 @@
+For the GNU C Library Security Advisories, see the git master branch:
+https://sourceware.org/git/?p=glibc.git;a=tree;f=advisories;hb=HEAD
diff --git a/advisories/GLIBC-SA-2023-0001 b/advisories/GLIBC-SA-2023-0001
deleted file mode 100644
index 3d19c91b6a..0000000000
--- a/advisories/GLIBC-SA-2023-0001
+++ /dev/null
@@ -1,14 +0,0 @@
-printf: incorrect output for integers with thousands separator and width field
-
-When the printf family of functions is called with a format specifier
-that uses an <apostrophe> (enable grouping) and a minimum width
-specifier, the resulting output could be larger than reasonably expected
-by a caller that computed a tight bound on the buffer size. The
-resulting larger than expected output could result in a buffer overflow
-in the printf family of functions.
-
-CVE-Id: CVE-2023-25139
-Public-Date: 2023-02-02
-Vulnerable-Commit: e88b9f0e5cc50cab57a299dc7efe1a4eb385161d (2.37)
-Fix-Commit: c980549cc6a1c03c23cc2fe3e7b0fe626a0364b0 (2.38)
-Fix-Commit: 07b9521fc6369d000216b96562ff7c0ed32a16c4 (2.37-4)
diff --git a/advisories/GLIBC-SA-2023-0002 b/advisories/GLIBC-SA-2023-0002
deleted file mode 100644
index 5122669a64..0000000000
--- a/advisories/GLIBC-SA-2023-0002
+++ /dev/null
@@ -1,15 +0,0 @@
-getaddrinfo: Stack read overflow in no-aaaa mode
-
-If the system is configured in no-aaaa mode via /etc/resolv.conf,
-getaddrinfo is called for the AF_UNSPEC address family, and a DNS
-response is received over TCP that is larger than 2048 bytes,
-getaddrinfo may potentially disclose stack contents via the returned
-address data, or crash.
-
-CVE-Id: CVE-2023-4527
-Public-Date: 2023-09-12
-Vulnerable-Commit: f282cdbe7f436c75864e5640a409a10485e9abb2 (2.36)
-Fix-Commit: bd77dd7e73e3530203be1c52c8a29d08270cb25d (2.39)
-Fix-Commit: 4ea972b7edd7e36610e8cde18bf7a8149d7bac4f (2.36-113)
-Fix-Commit: b7529346025a130fee483d42178b5c118da971bb (2.37-38)
-Fix-Commit: b25508dd774b617f99419bdc3cf2ace4560cd2d6 (2.38-19)
diff --git a/advisories/GLIBC-SA-2023-0003 b/advisories/GLIBC-SA-2023-0003
deleted file mode 100644
index d3aef80348..0000000000
--- a/advisories/GLIBC-SA-2023-0003
+++ /dev/null
@@ -1,15 +0,0 @@
-getaddrinfo: Potential use-after-free
-
-When an NSS plugin only implements the _gethostbyname2_r and
-_getcanonname_r callbacks, getaddrinfo could use memory that was freed
-during buffer resizing, potentially causing a crash or read or write to
-arbitrary memory.
-
-CVE-Id: CVE-2023-4806
-Public-Date: 2023-09-12
-Fix-Commit: 973fe93a5675c42798b2161c6f29c01b0e243994 (2.39)
-Fix-Commit: e09ee267c03e3150c2c9ba28625ab130705a485e (2.34-420)
-Fix-Commit: e3ccb230a961b4797510e6a1f5f21fd9021853e7 (2.35-270)
-Fix-Commit: a9728f798ec7f05454c95637ee6581afaa9b487d (2.36-115)
-Fix-Commit: 6529a7466c935f36e9006b854d6f4e1d4876f942 (2.37-39)
-Fix-Commit: 00ae4f10b504bc4564e9f22f00907093f1ab9338 (2.38-20)
diff --git a/advisories/GLIBC-SA-2023-0004 b/advisories/GLIBC-SA-2023-0004
deleted file mode 100644
index 5286a7aa54..0000000000
--- a/advisories/GLIBC-SA-2023-0004
+++ /dev/null
@@ -1,16 +0,0 @@
-tunables: local privilege escalation through buffer overflow
-
-If a tunable of the form NAME=NAME=VAL is passed in the environment of a
-setuid program and NAME is valid, it may result in a buffer overflow,
-which could be exploited to achieve escalated privileges. This flaw was
-introduced in glibc 2.34.
-
-CVE-Id: CVE-2023-4911
-Public-Date: 2023-10-03
-Vulnerable-Commit: 2ed18c5b534d9e92fc006202a5af0df6b72e7aca (2.34)
-Fix-Commit: 1056e5b4c3f2d90ed2b4a55f96add28da2f4c8fa (2.39)
-Fix-Commit: dcc367f148bc92e7f3778a125f7a416b093964d9 (2.34-423)
-Fix-Commit: c84018a05aec80f5ee6f682db0da1130b0196aef (2.35-274)
-Fix-Commit: 22955ad85186ee05834e47e665056148ca07699c (2.36-118)
-Fix-Commit: b4e23c75aea756b4bddc4abcf27a1c6dca8b6bd3 (2.37-45)
-Fix-Commit: 750a45a783906a19591fb8ff6b7841470f1f5701 (2.38-27)
diff --git a/advisories/GLIBC-SA-2023-0005 b/advisories/GLIBC-SA-2023-0005
deleted file mode 100644
index cc4eb90b82..0000000000
--- a/advisories/GLIBC-SA-2023-0005
+++ /dev/null
@@ -1,18 +0,0 @@
-getaddrinfo: DoS due to memory leak
-
-The fix for CVE-2023-4806 introduced a memory leak when an application
-calls getaddrinfo for AF_INET6 with AI_CANONNAME, AI_ALL and AI_V4MAPPED
-flags set.
-
-CVE-Id: CVE-2023-5156
-Public-Date: 2023-09-25
-Vulnerable-Commit: e09ee267c03e3150c2c9ba28625ab130705a485e (2.34-420)
-Vulnerable-Commit: e3ccb230a961b4797510e6a1f5f21fd9021853e7 (2.35-270)
-Vulnerable-Commit: a9728f798ec7f05454c95637ee6581afaa9b487d (2.36-115)
-Vulnerable-Commit: 6529a7466c935f36e9006b854d6f4e1d4876f942 (2.37-39)
-Vulnerable-Commit: 00ae4f10b504bc4564e9f22f00907093f1ab9338 (2.38-20)
-Fix-Commit: 8006457ab7e1cd556b919f477348a96fe88f2e49 (2.34-421)
-Fix-Commit: 17092c0311f954e6f3c010f73ce3a78c24ac279a (2.35-272)
-Fix-Commit: 856bac55f98dc840e7c27cfa82262b933385de90 (2.36-116)
-Fix-Commit: 4473d1b87d04b25cdd0e0354814eeaa421328268 (2.37-42)
-Fix-Commit: 5ee59ca371b99984232d7584fe2b1a758b4421d3 (2.38-24)
diff --git a/advisories/GLIBC-SA-2024-0001 b/advisories/GLIBC-SA-2024-0001
deleted file mode 100644
index 28931c75ae..0000000000
--- a/advisories/GLIBC-SA-2024-0001
+++ /dev/null
@@ -1,15 +0,0 @@
-syslog: Heap buffer overflow in __vsyslog_internal
-
-__vsyslog_internal did not handle a case where printing a SYSLOG_HEADER
-containing a long program name failed to update the required buffer
-size, leading to the allocation and overflow of a too-small buffer on
-the heap.
-
-CVE-Id: CVE-2023-6246
-Public-Date: 2024-01-30
-Vulnerable-Commit: 52a5be0df411ef3ff45c10c7c308cb92993d15b1 (2.37)
-Fix-Commit: 6bd0e4efcc78f3c0115e5ea9739a1642807450da (2.39)
-Fix-Commit: 23514c72b780f3da097ecf33a793b7ba9c2070d2 (2.38-42)
-Fix-Commit: 97a4292aa4a2642e251472b878d0ec4c46a0e59a (2.37-57)
-Vulnerable-Commit: b0e7888d1fa2dbd2d9e1645ec8c796abf78880b9 (2.36-16)
-Fix-Commit: d1a83b6767f68b3cb5b4b4ea2617254acd040c82 (2.36-126)
diff --git a/advisories/GLIBC-SA-2024-0002 b/advisories/GLIBC-SA-2024-0002
deleted file mode 100644
index 940bfcf2fc..0000000000
--- a/advisories/GLIBC-SA-2024-0002
+++ /dev/null
@@ -1,15 +0,0 @@
-syslog: Heap buffer overflow in __vsyslog_internal
-
-__vsyslog_internal used the return value of snprintf/vsnprintf to
-calculate buffer sizes for memory allocation. If these functions (for
-any reason) failed and returned -1, the resulting buffer would be too
-small to hold output.
-
-CVE-Id: CVE-2023-6779
-Public-Date: 2024-01-30
-Vulnerable-Commit: 52a5be0df411ef3ff45c10c7c308cb92993d15b1 (2.37)
-Fix-Commit: 7e5a0c286da33159d47d0122007aac016f3e02cd (2.39)
-Fix-Commit: d0338312aace5bbfef85e03055e1212dd0e49578 (2.38-43)
-Fix-Commit: 67062eccd9a65d7fda9976a56aeaaf6c25a80214 (2.37-58)
-Vulnerable-Commit: b0e7888d1fa2dbd2d9e1645ec8c796abf78880b9 (2.36-16)
-Fix-Commit: 2bc9d7c002bdac38b5c2a3f11b78e309d7765b83 (2.36-127)
diff --git a/advisories/GLIBC-SA-2024-0003 b/advisories/GLIBC-SA-2024-0003
deleted file mode 100644
index b43a5150ab..0000000000
--- a/advisories/GLIBC-SA-2024-0003
+++ /dev/null
@@ -1,13 +0,0 @@
-syslog: Integer overflow in __vsyslog_internal
-
-__vsyslog_internal calculated a buffer size by adding two integers, but
-did not first check if the addition would overflow.
-
-CVE-Id: CVE-2023-6780
-Public-Date: 2024-01-30
-Vulnerable-Commit: 52a5be0df411ef3ff45c10c7c308cb92993d15b1 (2.37)
-Fix-Commit: ddf542da94caf97ff43cc2875c88749880b7259b (2.39)
-Fix-Commit: d37c2b20a4787463d192b32041c3406c2bd91de0 (2.38-44)
-Fix-Commit: 2b58cba076e912961ceaa5fa58588e4b10f791c0 (2.37-59)
-Vulnerable-Commit: b0e7888d1fa2dbd2d9e1645ec8c796abf78880b9 (2.36-16)
-Fix-Commit: b9b7d6a27aa0632f334352fa400771115b3c69b7 (2.36-128)
diff --git a/advisories/README b/advisories/README
deleted file mode 100644
index 94e68b1350..0000000000
--- a/advisories/README
+++ /dev/null
@@ -1,73 +0,0 @@
-GNU C Library Security Advisory Format
-======================================
-
-Security advisories in this directory follow a simple git commit log
-format, with a heading and free-format description augmented with tags
-to allow parsing key information. References to code changes are
-specific to the glibc repository and follow a specific format:
-
- Tag-name: <commit-ref> (release-version)
-
-The <commit-ref> indicates a specific commit in the repository. The
-release-version indicates the publicly consumable release in which this
-commit is known to exist. The release-version is derived from the
-git-describe format, (i.e. stripped out from glibc-2.34.NNN-gxxxx) and
-is of the form 2.34-NNN. If the -NNN suffix is absent, it means that
-the change is in that release tarball, otherwise the change is on the
-release/2.YY/master branch and not in any released tarball.
-
-The following tags are currently being used:
-
-CVE-Id:
-This is the CVE-Id assigned under the CVE Program
-(https://www.cve.org/).
-
-Public-Date:
-The date this issue became publicly known.
-
-Vulnerable-Commit:
-The commit that introduced this vulnerability. There could be multiple
-entries, one for each release branch in the glibc repository; the
-release-version portion of this tag should tell you which branch this is
-on.
-
-Fix-Commit:
-The commit that fixed this vulnerability. There could be multiple
-entries for each release branch in the glibc repository, indicating that
-all of those commits contributed to fixing that issue in each of those
-branches.
-
-Adding an Advisory
-------------------
-
-An advisory for a CVE needs to be added on the master branch in two steps:
-
-1. Add the text of the advisory without any Fix-Commit tags along with
- the fix for the CVE. Add the Vulnerable-Commit tag, if applicable.
- The advisories directory does not exist in release branches, so keep
- the advisory text commit distinct from the code changes, to ease
- backports. Ask for the GLIBC-SA advisory number from the security
- team.
-
-2. Finish all backports on release branches and then back on the msater
- branch, add all commit refs to the advisory using the Fix-Commit
- tags. Don't bother adding the release-version subscript since the
- next step will overwrite it.
-
-3. Run the process-advisories.sh script in the scripts directory on the
- advisory:
-
- scripts/process-advisories.sh update GLIBC-SA-YYYY-NNNN
-
- (replace YYYY-NNNN with the actual advisory number).
-
-4. Verify the updated advisory and push the result.
-
-Getting a NEWS snippet from advisories
---------------------------------------
-
-Run:
-
- scripts/process-advisories.sh news
-
-and copy the content into the NEWS file.
commit 63295e4fda1f6dab4bf7442706fe303bf283036c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Feb 5 16:10:24 2024 +0000
arm: Remove wrong ldr from _dl_start_user (BZ 31339)
The commit 49d877a80b29d3002887b084eec6676d9f5fec18 (arm: Remove
_dl_skip_args usage) removed the _SKIP_ARGS literal, which was
previously loader to r4 on loader _start. However, the cleanup did not
remove the following 'ldr r4, [sl, r4]' on _dl_start_user, used to check
to skip the arguments after ld self-relocations.
In my testing, the kernel initially set r4 to 0, which makes the
ldr instruction just read the _GLOBAL_OFFSET_TABLE_. However, since r4
is a callee-saved register; a different runtime might not zero
initialize it and thus trigger an invalid memory access.
Checked on arm-linux-gnu.
Reported-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
(cherry picked from commit 1e25112dc0cb2515d27d8d178b1ecce778a9d37a)
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index b857bbc868..dd1a0f6b6e 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -139,7 +139,6 @@ _start:\n\
_dl_start_user:\n\
adr r6, .L_GET_GOT\n\
add sl, sl, r6\n\
- ldr r4, [sl, r4]\n\
@ save the entry point in another register\n\
mov r6, r0\n\
@ get the original arg count\n\
commit 312e159626b67fe11f39e83e222cf4348a3962f3
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Feb 1 14:29:53 2024 -0300
mips: FIx clone3 implementation (BZ 31325)
For o32 we need to setup a minimal stack frame to allow cprestore
on __thread_start_clone3 (which instruct the linker to save the
gp for PIC). Also, there is no guarantee by kABI that $8 will be
preserved after syscall execution, so we need to save it on the
provided stack.
Checked on mipsel-linux-gnu.
Reported-by: Khem Raj <raj.khem@gmail.com>
Tested-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit bbd248ac0d75efdef8fe61ea69b1fb25fb95b6e7)
diff --git a/sysdeps/unix/sysv/linux/mips/clone3.S b/sysdeps/unix/sysv/linux/mips/clone3.S
index e9fec2fa47..481b8ae963 100644
--- a/sysdeps/unix/sysv/linux/mips/clone3.S
+++ b/sysdeps/unix/sysv/linux/mips/clone3.S
@@ -37,11 +37,6 @@
.text
.set nomips16
-#if _MIPS_SIM == _ABIO32
-# define EXTRA_LOCALS 1
-#else
-# define EXTRA_LOCALS 0
-#endif
#define FRAMESZ ((NARGSAVE*SZREG)+ALSZ)&ALMASK
GPOFF= FRAMESZ-(1*SZREG)
NESTED(__clone3, SZREG, sp)
@@ -68,8 +63,31 @@ NESTED(__clone3, SZREG, sp)
beqz a0, L(error) /* No NULL cl_args pointer. */
beqz a2, L(error) /* No NULL function pointer. */
+#if _MIPS_SIM == _ABIO32
+ /* Both stack and stack_size on clone_args are defined as uint64_t, and
+ there is no need to handle values larger than to 32 bits for o32. */
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define CL_STACKPOINTER_OFFSET 44
+# define CL_STACKSIZE_OFFSET 52
+# else
+# define CL_STACKPOINTER_OFFSET 40
+# define CL_STACKSIZE_OFFSET 48
+# endif
+
+ /* For o32 we need to setup a minimal stack frame to allow cprestore
+ on __thread_start_clone3. Also there is no guarantee by kABI that
+ $8 will be preserved after syscall execution (so we need to save it
+ on the provided stack). */
+ lw t0, CL_STACKPOINTER_OFFSET(a0) /* Load the stack pointer. */
+ lw t1, CL_STACKSIZE_OFFSET(a0) /* Load the stack_size. */
+ addiu t1, -32 /* Update the stack size. */
+ addu t2, t1, t0 /* Calculate the thread stack. */
+ sw a3, 0(t2) /* Save argument pointer. */
+ sw t1, CL_STACKSIZE_OFFSET(a0) /* Save the new stack size. */
+#else
move $8, a3 /* a3 is set to 0/1 for syscall success/error
while a4/$8 is returned unmodified. */
+#endif
/* Do the system call, the kernel expects:
v0: system call number
@@ -125,7 +143,11 @@ L(thread_start_clone3):
/* Restore the arg for user's function. */
move t9, a2 /* Function pointer. */
+#if _MIPS_SIM == _ABIO32
+ PTR_L a0, 0(sp)
+#else
move a0, $8 /* Argument pointer. */
+#endif
/* Call the user's function. */
jal t9
commit d0724994de40934c552f1f68de89053848a44927
Author: Xi Ruoyao <xry111@xry111.site>
Date: Thu Feb 22 21:26:55 2024 +0100
math: Update mips64 ulps
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
(cherry picked from commit e2a65ecc4b30a797df7dc6529f09b712aa256029)
diff --git a/sysdeps/mips/mips64/libm-test-ulps b/sysdeps/mips/mips64/libm-test-ulps
index 78969745b2..933aba4735 100644
--- a/sysdeps/mips/mips64/libm-test-ulps
+++ b/sysdeps/mips/mips64/libm-test-ulps
@@ -1066,17 +1066,17 @@ double: 1
ldouble: 1
Function: "j0":
-double: 2
+double: 3
float: 9
ldouble: 2
Function: "j0_downward":
-double: 5
+double: 6
float: 9
ldouble: 9
Function: "j0_towardzero":
-double: 6
+double: 7
float: 9
ldouble: 9
@@ -1146,6 +1146,7 @@ float: 6
ldouble: 8
Function: "log":
+double: 1
float: 1
ldouble: 1
commit e0910f1d3278f05439fb434ee528fc9be1b6bd5e
Author: Stefan Liebler <stli@linux.ibm.com>
Date: Thu Feb 22 15:03:27 2024 +0100
S390: Do not clobber r7 in clone [BZ #31402]
Starting with commit e57d8fc97b90127de4ed3e3a9cdf663667580935
"S390: Always use svc 0"
clone clobbers the call-saved register r7 in error case:
function or stack is NULL.
This patch restores the saved registers also in the error case.
Furthermore the existing test misc/tst-clone is extended to check
all error cases and that clone does not clobber registers in this
error case.
(cherry picked from commit 02782fd12849b6673cb5c2728cb750e8ec295aa3)
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/clone.S b/sysdeps/unix/sysv/linux/s390/s390-32/clone.S
index 4c882ef2ee..a7a863242c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/clone.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/clone.S
@@ -53,6 +53,7 @@ ENTRY(__clone)
br %r14
error:
lhi %r2,-EINVAL
+ lm %r6,%r7,24(%r15) /* Load registers. */
j SYSCALL_ERROR_LABEL
PSEUDO_END (__clone)
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/clone.S b/sysdeps/unix/sysv/linux/s390/s390-64/clone.S
index 4eb104be71..c552a6b8de 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/clone.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/clone.S
@@ -54,6 +54,7 @@ ENTRY(__clone)
br %r14
error:
lghi %r2,-EINVAL
+ lmg %r6,%r7,48(%r15) /* Restore registers. */
jg SYSCALL_ERROR_LABEL
PSEUDO_END (__clone)
diff --git a/sysdeps/unix/sysv/linux/tst-clone.c b/sysdeps/unix/sysv/linux/tst-clone.c
index 470676ab2b..2bc7124983 100644
--- a/sysdeps/unix/sysv/linux/tst-clone.c
+++ b/sysdeps/unix/sysv/linux/tst-clone.c
@@ -16,12 +16,16 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-/* BZ #2386 */
+/* BZ #2386, BZ #31402 */
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sched.h>
+#include <stackinfo.h> /* For _STACK_GROWS_{UP,DOWN}. */
+#include <support/check.h>
+
+volatile unsigned v = 0xdeadbeef;
int child_fn(void *arg)
{
@@ -30,22 +34,67 @@ int child_fn(void *arg)
}
static int
-do_test (void)
+__attribute__((noinline))
+do_clone (int (*fn)(void *), void *stack)
{
int result;
+ unsigned int a = v;
+ unsigned int b = v;
+ unsigned int c = v;
+ unsigned int d = v;
+ unsigned int e = v;
+ unsigned int f = v;
+ unsigned int g = v;
+ unsigned int h = v;
+ unsigned int i = v;
+ unsigned int j = v;
+ unsigned int k = v;
+ unsigned int l = v;
+ unsigned int m = v;
+ unsigned int n = v;
+ unsigned int o = v;
+
+ result = clone (fn, stack, 0, NULL);
+
+ /* Check that clone does not clobber call-saved registers. */
+ TEST_VERIFY (a == v && b == v && c == v && d == v && e == v && f == v
+ && g == v && h == v && i == v && j == v && k == v && l == v
+ && m == v && n == v && o == v);
+
+ return result;
+}
+
+static void
+__attribute__((noinline))
+do_test_single (int (*fn)(void *), void *stack)
+{
+ printf ("%s (fn=%p, stack=%p)\n", __FUNCTION__, fn, stack);
+ errno = 0;
+
+ int result = do_clone (fn, stack);
+
+ TEST_COMPARE (errno, EINVAL);
+ TEST_COMPARE (result, -1);
+}
- result = clone (child_fn, NULL, 0, NULL);
+static int
+do_test (void)
+{
+ char st[128 * 1024] __attribute__ ((aligned));
+ void *stack = NULL;
+#if _STACK_GROWS_DOWN
+ stack = st + sizeof (st);
+#elif _STACK_GROWS_UP
+ stack = st;
+#else
+# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
+#endif
- if (errno != EINVAL || result != -1)
- {
- printf ("FAIL: clone()=%d (wanted -1) errno=%d (wanted %d)\n",
- result, errno, EINVAL);
- return 1;
- }
+ do_test_single (child_fn, NULL);
+ do_test_single (NULL, stack);
+ do_test_single (NULL, NULL);
- puts ("All OK");
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>

View File

@ -36,16 +36,15 @@
, withLinuxHeaders ? false
, profilingLibraries ? false
, withGd ? false
, withLibcrypt ? false
, extraBuildInputs ? []
, extraNativeBuildInputs ? []
, ...
} @ args:
let
version = "2.38";
patchSuffix = "-44";
sha256 = "sha256-+4KZiZiyspllRnvBtp0VLpwwfSzzAcnq+0VVt3DvP9I=";
version = "2.39";
patchSuffix = "-5";
sha256 = "sha256-93vUfPgXDFc2Wue/hmlsEYrbOxINMlnGTFAtPcHi2SY=";
in
assert withLinuxHeaders -> linuxHeaders != null;
@ -59,14 +58,14 @@ stdenv.mkDerivation ({
patches =
[
/* No tarballs for stable upstream branch, only https://sourceware.org/git/glibc.git and using git would complicate bootstrapping.
$ git fetch --all -p && git checkout origin/release/2.38/master && git describe
glibc-2.38-44-gd37c2b20a4
$ git show --minimal --reverse glibc-2.38.. | gzip -9n --rsyncable - > 2.38-master.patch.gz
$ git fetch --all -p && git checkout origin/release/2.39/master && git describe
glibc-2.39-5-ge0910f1d32
$ git show --minimal --reverse glibc-2.39.. > 2.39-master.patch
To compare the archive contents zdiff can be used.
$ zdiff -u 2.38-master.patch.gz ../nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz
$ diff -u 2.39-master.patch ../nixpkgs/pkgs/development/libraries/glibc/2.39-master.patch
*/
./2.38-master.patch.gz
./2.39-master.patch
/* Allow NixOS and Nix to handle the locale-archive. */
./nix-locale-archive.patch
@ -96,11 +95,6 @@ stdenv.mkDerivation ({
& https://github.com/NixOS/nixpkgs/pull/188492#issuecomment-1233802991
*/
./reenable_DT_HASH.patch
/* Retrieved from https://salsa.debian.org/glibc-team/glibc/-/commit/662dbc4f9287139a0d9c91df328a5ba6cc6abee1#0f3c6d67cb8cf5bb35c421c20f828fea97b68edf
Qualys advisory: https://www.qualys.com/2024/01/30/qsort.txt
*/
./local-qsort-memory-corruption.patch
]
/* NVCC does not support ARM intrinsics. Since <math.h> is pulled in by almost
every HPC piece of software, without this patch CUDA compilation on ARM
@ -177,8 +171,7 @@ stdenv.mkDerivation ({
# so the glibc does not depend on its compiler store path
"libc_cv_as_needed=no"
]
++ lib.optional withGd "--with-gd"
++ lib.optional withLibcrypt "--enable-crypt";
++ lib.optional withGd "--with-gd";
makeFlags = (args.makeFlags or []) ++ [
"OBJCOPY=${stdenv.cc.targetPrefix}objcopy"

View File

@ -2,7 +2,6 @@
, withLinuxHeaders ? true
, profilingLibraries ? false
, withGd ? false
, withLibcrypt? false
, pkgsBuildBuild
, libgcc
}:
@ -16,7 +15,7 @@ let
in
(callPackage ./common.nix { inherit stdenv; } {
inherit withLinuxHeaders withGd profilingLibraries withLibcrypt;
inherit withLinuxHeaders withGd profilingLibraries;
pname = "glibc" + lib.optionalString withGd "-gd" + lib.optionalString (stdenv.cc.isGNU && libgcc==null) "-nolibgcc";
}).overrideAttrs(previousAttrs: {

View File

@ -1,14 +0,0 @@
diff -rup a/stdlib/qsort.c b/stdlib/qsort.c
--- a/stdlib/qsort.c 2023-07-31 10:54:16.000000000 -0700
+++ b/stdlib/qsort.c 2024-01-15 09:08:25.596167959 -0800
@@ -224,7 +224,8 @@ _quicksort (void *const pbase, size_t to
while ((run_ptr += size) <= end_ptr)
{
tmp_ptr = run_ptr - size;
- while ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0)
+ while (tmp_ptr != base_ptr
+ && (*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0)
tmp_ptr -= size;
tmp_ptr += size;

View File

@ -1,7 +1,7 @@
{ config
, lib
{ lib
, stdenv
, fetchurl
, fetchpatch2
, zlib
, lzo
, libtasn1
@ -57,11 +57,11 @@ in
stdenv.mkDerivation rec {
pname = "gnutls";
version = "3.8.3";
version = "3.8.4";
src = fetchurl {
url = "mirror://gnupg/gnutls/v${lib.versions.majorMinor version}/gnutls-${version}.tar.xz";
hash = "sha256-90/FlUsn1Oxt+7Ed6ph4iLWxJCiaNwOvytoO5SD0Fz4=";
hash = "sha256-K+pOFUeU8/ABgPoqXFH+iwBax6Mc1YvUTN+n8268Ops=";
};
outputs = [ "bin" "dev" "out" ]
@ -73,6 +73,15 @@ stdenv.mkDerivation rec {
patches = [
./nix-ssl-cert-file.patch
# Revert https://gitlab.com/gnutls/gnutls/-/merge_requests/1800
# dlopen isn't as easy in NixPkgs, as noticed in tests broken by this.
# Without getting the libs into RPATH they won't be found.
(fetchpatch2 {
name = "revert-dlopen-compression.patch";
url = "https://gitlab.com/gnutls/gnutls/-/commit/8584908d6b679cd4e7676de437117a793e18347c.diff";
revert = true;
hash = "sha256-r/+Gmwqy0Yc1LHL/PdPLXlErUBC5JxquLzCBAN3LuRM=";
})
];
# Skip some tests:
@ -87,6 +96,12 @@ stdenv.mkDerivation rec {
sed 's:/usr/lib64/pkcs11/ /usr/lib/pkcs11/ /usr/lib/x86_64-linux-gnu/pkcs11/:`pkg-config --variable=p11_module_path p11-kit-1`:' -i tests/p11-kit-trust.sh
'' + lib.optionalString stdenv.hostPlatform.isMusl '' # See https://gitlab.com/gnutls/gnutls/-/issues/945
sed '2iecho "certtool tests skipped in musl build"\nexit 0' -i tests/cert-tests/certtool.sh
'' + lib.optionalString stdenv.hostPlatform.isStatic ''
# Adapted from https://gitlab.com/gnutls/gnutls/-/commit/d214cd4570fb1559a20e941bb7ceac7df52e96d3
# Can be removed with 3.8.5+.
sed -i lib/nettle/backport/rsa-sign-tr.c -e \
'/^#include <nettle\/rsa\.h>/i\
#define nettle_rsa_compute_root_tr _gnutls_nettle_backport_rsa_compute_root_tr'
'';
preConfigure = "patchShebangs .";
@ -112,7 +127,7 @@ stdenv.mkDerivation rec {
++ lib.optional (withP11-kit) p11-kit
++ lib.optional (tpmSupport && stdenv.isLinux) trousers;
nativeBuildInputs = [ perl pkg-config texinfo ]
nativeBuildInputs = [ perl pkg-config texinfo ] ++ [ autoconf automake ]
++ lib.optionals doCheck [ which nettools util-linux ];
propagatedBuildInputs = [ nettle ]

View File

@ -31,13 +31,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libblockdev";
version = "3.0.4";
version = "3.1.1";
src = fetchFromGitHub {
owner = "storaged-project";
repo = "libblockdev";
rev = "${finalAttrs.version}-1";
hash = "sha256-9tPI8FyHQ9i7p4HLrxiseIH8Y5uqnlsNjcZ1qIHCcRY=";
hash = "sha256-WCMedMkaMMhZbB3iJu3c+CTT3AvOjzOSYP45J+NQEDQ=";
};
outputs = [ "out" "dev" "devdoc" ];

View File

@ -26,7 +26,7 @@
stdenv.mkDerivation rec {
pname = "libhandy";
version = "1.8.2";
version = "1.8.3";
outputs = [
"out"
@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "sha256-0RqizT5XCsbQ79ukbRcxR8EfRYJkV+kkwFmQuy4N+a0=";
sha256 = "sha256-BbSXIpBz/1V/ELMm4HTFBm+HQ6MC1IIKuXvLXNLasIc=";
};
depsBuildBuild = [

View File

@ -18,14 +18,14 @@
stdenv.mkDerivation rec {
pname = "libnice";
version = "0.1.21";
version = "0.1.22";
outputs = [ "bin" "out" "dev" ]
++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
src = fetchurl {
url = "https://libnice.freedesktop.org/releases/${pname}-${version}.tar.gz";
hash = "sha256-cuc6Ks8g9ZCT4h1WAWBuQFhzUD6zXzRvpiHeI+mbOzk=";
hash = "sha256-pfckzwnq5QxBp1FxQdidpKYeyerKMtpKAHP67VQXrX4=";
};
patches = [

View File

@ -42,7 +42,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "librsvg";
version = "2.57.1";
version = "2.57.92";
outputs = [ "out" "dev" ] ++ lib.optionals withIntrospection [
"devdoc"
@ -50,13 +50,13 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchurl {
url = "mirror://gnome/sources/librsvg/${lib.versions.majorMinor finalAttrs.version}/librsvg-${finalAttrs.version}.tar.xz";
hash = "sha256-B0Zxo+1vvNZ8ripA5TkQf08JfKikqxqJTAXiUk/zQO8=";
hash = "sha256-Kiwwvqvzz91ApKbb7T+zPmd8ruXY8wR4gkm3Mee+OFI=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit (finalAttrs) src;
name = "librsvg-deps-${finalAttrs.version}";
hash = "sha256-zICI7sps5KYe8/yWXbCJv529KxGLjoyDOmpCgVAIsTs=";
hash = "sha256-yJf3V2dPwI+RcDH6Lh/AhUgaisdbTnzdAFt+SeNw9NY=";
# TODO: move this to fetchCargoTarball
dontConfigure = true;
};

View File

@ -7,6 +7,7 @@
, pkg-config
, sphinx
, lerc
, libdeflate
, libjpeg
, xz
@ -62,6 +63,10 @@ stdenv.mkDerivation (finalAttrs: {
# sure cross-compilation works first!
nativeBuildInputs = [ autoreconfHook pkg-config sphinx ];
buildInputs = [
lerc
];
# TODO: opengl support (bogus configure detection)
propagatedBuildInputs = [
libdeflate

View File

@ -14,13 +14,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "libva" + lib.optionalString minimal "-minimal";
version = "2.20.0";
version = "2.21.0";
src = fetchFromGitHub {
owner = "intel";
repo = "libva";
rev = finalAttrs.version;
sha256 = "sha256-ENAsytjqvS8xHZyZLPih3bzBgQ1f/j+s3dWZs1GTWHs=";
sha256 = "sha256-X9H5nxbYFSMfxZMxs3iWwCgdrJ2FTVWW7tlgQek3WIg=";
};
outputs = [ "dev" "out" ];

View File

@ -23,19 +23,9 @@
, testers
}:
let
# Newer versions fail with minimal python, probably because
# https://gitlab.gnome.org/GNOME/libxml2/-/commit/b706824b612adb2c8255819c9a55e78b52774a3c
# This case is encountered "temporarily" during stdenv bootstrapping on darwin.
# Beware that the old version has known security issues, so the final set shouldn't use it.
oldVer = python.pname == "python3-minimal";
in
assert oldVer -> stdenv.isDarwin; # reduce likelihood of using old libxml2 unintentionally
let
libxml = stdenv.mkDerivation (finalAttrs: rec {
stdenv.mkDerivation (finalAttrs: rec {
pname = "libxml2";
version = "2.12.5";
version = "2.12.6";
outputs = [ "bin" "dev" "out" "doc" ]
++ lib.optional pythonSupport "py"
@ -44,7 +34,7 @@ libxml = stdenv.mkDerivation (finalAttrs: rec {
src = fetchurl {
url = "mirror://gnome/sources/libxml2/${lib.versions.majorMinor version}/libxml2-${version}.tar.xz";
hash = "sha256-qXJ5Zpav04Bz4PWcKDw6L1pWC1JotLq8ORsoYWZSayE=";
hash = "sha256-iJxZOogaPbX92WzJMYyH3zTrZI7fxFgnKtRv1gc1P7s=";
};
strictDeps = true;
@ -139,15 +129,4 @@ libxml = stdenv.mkDerivation (finalAttrs: rec {
maintainers = with maintainers; [ eelco jtojnar ];
pkgConfigModules = [ "libxml-2.0" ];
};
});
in
if oldVer then
libxml.overrideAttrs (attrs: rec {
version = "2.10.1";
src = fetchurl {
url = "mirror://gnome/sources/libxml2/${lib.versions.majorMinor version}/libxml2-${version}.tar.xz";
sha256 = "21a9e13cc7c4717a6c36268d0924f92c3f67a1ece6b7ff9d588958a6db9fb9d8";
};
})
else
libxml

View File

@ -12,13 +12,13 @@
stdenv.mkDerivation rec {
pname = "mvfst";
version = "2024.01.22.00";
version = "2024.03.11.00";
src = fetchFromGitHub {
owner = "facebook";
repo = "mvfst";
rev = "v${version}";
sha256 = "sha256-vhLwxA91v+vt5PQejhPOaj9YSkulg86hTD9GkpQKB24=";
sha256 = "sha256-KjNTDgpiR9EG42Agl2JFJoPo5+8GlS27oPMWpdLq2v8=";
};
nativeBuildInputs = [ cmake ];

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl }:
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook }:
stdenv.mkDerivation rec {
pname = "npth";
@ -9,6 +9,16 @@ stdenv.mkDerivation rec {
sha256 = "sha256-hYn1aTe3XOM7KNMS/MvzArO3HsPzlF/eaqp0AnkUrQU=";
};
patches = [
(fetchpatch {
name = "musl.patch";
url = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git;a=patch;h=417abd56fd7bf45cd4948414050615cb1ad59134";
hash = "sha256-0g2tLFjW1bybNi6oxlW7vPimsQLjmTih4JZSoATjESI=";
})
];
nativeBuildInputs = [ autoreconfHook ];
doCheck = true;
meta = with lib; {

View File

@ -24,13 +24,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "pango";
version = "1.51.0";
version = "1.51.2";
outputs = [ "bin" "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
src = fetchurl {
url = with finalAttrs; "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "dO/BCa5vkDu+avd+qirGCUuO4kWi4j8TKnqPCGLRqfU=";
sha256 = "sha256-PbpAfytfwRfhkvMCXwocyO3B/ZuTSxxXiyuXNCE5QVo=";
};
depsBuildBuild = [

View File

@ -8,13 +8,13 @@
stdenv.mkDerivation rec {
pname = "s2n-tls";
version = "1.4.6";
version = "1.4.8";
src = fetchFromGitHub {
owner = "aws";
repo = pname;
rev = "v${version}";
hash = "sha256-x4/AkmkmuTKxzlk8AxbydA4GctpShsKiFTTJ8m7B4TY=";
hash = "sha256-fDofKp/WUPY4+1HUeBdRklInTS7Qndycnci4h3F/mLY=";
};
nativeBuildInputs = [ cmake ];

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "spirv-headers";
version = "1.3.275.0";
version = "1.3.280.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "vulkan-sdk-${version}";
hash = "sha256-/I9dJlBE0kvFvqooKuqMETtOE72Jmva3zIGnq0o4+aE=";
hash = "sha256-kyOAwe4R0FmeA9IIJF2eoZR+7g9LiGKaZ7FuIfkrXJ4=";
};
nativeBuildInputs = [ cmake ];

View File

@ -15,13 +15,13 @@ in
stdenv.mkDerivation rec {
pname = "sqlite${lib.optionalString interactive "-interactive"}";
version = "3.45.1";
version = "3.45.2";
# nixpkgs-update: no auto update
# NB! Make sure to update ./tools.nix src (in the same directory).
src = fetchurl {
url = "https://sqlite.org/2024/sqlite-autoconf-${archiveVersion version}.tar.gz";
hash = "sha256-zZwnhBt6WTLJiXZR4guGxwHddAVWmJsByllvz6PUmgo=";
hash = "sha256-vJBnRC7t8905mJtcXPv/83rmbMnJknTgwwUtxNSo9q4=";
};
outputs = [ "bin" "dev" "out" ];

View File

@ -4,12 +4,12 @@ let
archiveVersion = import ./archive-version.nix lib;
mkTool = { pname, makeTarget, description, homepage, mainProgram }: stdenv.mkDerivation rec {
inherit pname;
version = "3.45.1";
version = "3.45.2";
# nixpkgs-update: no auto update
src = assert version == sqlite.version; fetchurl {
url = "https://sqlite.org/2024/sqlite-src-${archiveVersion version}.zip";
hash = "sha256-f3sUpo7bzUpX3zqMTb1W0tNUam583VDeQM6wOvM9NLo=";
hash = "sha256-SkWjV3zIr2g8S9TG6Bp8eCxbfV2qBhdeosuXHKcWkbE=";
};
nativeBuildInputs = [ unzip ];

View File

@ -22,13 +22,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "umockdev";
version = "0.17.18";
version = "0.18.0";
outputs = [ "bin" "out" "dev" "devdoc" ];
src = fetchurl {
url = "https://github.com/martinpitt/umockdev/releases/download/${finalAttrs.version}/umockdev-${finalAttrs.version}.tar.xz";
sha256 = "sha256-RmrT4McV5W9Q6mqWUWWCPQc6hBN6y4oeObZlc2SKmF8=";
hash = "sha256-uJkeaKK89C6mCYjfqLzvAFUNmo6IvvZvn2mxp7H44ng=";
};
patches = [
@ -43,12 +43,6 @@ stdenv.mkDerivation (finalAttrs: {
src = ./substitute-udevadm.patch;
udevadm = "${systemdMinimal}/bin/udevadm";
})
(fetchpatch {
name = "musl.patch";
url = "https://github.com/martinpitt/umockdev/commit/d4efe24be59bd859b87473ea3d7efe8100bedc74.patch";
hash = "sha256-whf3p2e7FWN1xk5+HF9KsbMW74DPOQ0R0+FxBfCZTX0=";
})
];
nativeBuildInputs = [

View File

@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "vulkan-headers";
version = "1.3.275.0";
version = "1.3.280.0";
nativeBuildInputs = [ cmake ];
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
owner = "KhronosGroup";
repo = "Vulkan-Headers";
rev = "vulkan-sdk-${version}";
hash = "sha256-kBOkj7mr4stPXUCBhNJpNL3A+9BebEwrIBEIroxdH8Y=";
hash = "sha256-EnKiCtH6rh3ACQgokSSfp4FPFluMZW0dheP8IEzZtY4=";
};
passthru.updateScript = ./update.sh;

View File

@ -4,13 +4,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "vulkan-loader";
version = "1.3.275.0";
version = "1.3.280.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Loader";
rev = "vulkan-sdk-${finalAttrs.version}";
hash = "sha256-53PUXAWiK38ciV6oMvD7ZHdXi4RU4r0RmDWUUHU3mE0=";
hash = "sha256-zkJSPshRaZRDiBvLJbJo8l1MX10KXYZniqtNTNnokT4=";
};
patches = [ ./fix-pkgconfig.patch ];

Some files were not shown because too many files have changed in this diff Show More