···180180 </listitem>
181181 <listitem>
182182 <para>
183183+ Arguments should be listed in the order they are used, with the
184184+ exception of <varname>lib</varname>, which always goes first.
185185+ </para>
186186+ </listitem>
187187+ <listitem>
188188+ <para>
183189 Prefer using the top-level <varname>lib</varname> over its alias
184190 <literal>stdenv.lib</literal>. <varname>lib</varname> is unrelated to
185191 <varname>stdenv</varname>, and so <literal>stdenv.lib</literal> should only
+2-2
doc/languages-frameworks/coq.section.md
···4242Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes some `mathcomp` derivations as `extraBuildInputs`.
43434444```nix
4545-{ coq, mkCoqDerivation, mathcomp, mathcomp-finmap, mathcomp-bigenough,
4646- lib, version ? null }:
4545+{ lib, mkCoqDerivation, version ? null
4646+, coq, mathcomp, mathcomp-finmap, mathcomp-bigenough }:
4747with lib; mkCoqDerivation {
4848 /* namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` */
4949 namePrefix = [ "coq" "mathcomp" ];
+5-5
doc/languages-frameworks/idris.section.md
···6969As an example of how a Nix expression for an Idris package can be created, here is the one for `idrisPackages.yaml`:
70707171```nix
7272-{ build-idris-package
7272+{ lib
7373+, build-idris-package
7374, fetchFromGitHub
7475, contrib
7576, lightyear
7676-, lib
7777}:
7878build-idris-package {
7979 name = "yaml";
···9494 sha256 = "1g4pi0swmg214kndj85hj50ccmckni7piprsxfdzdfhg87s0avw7";
9595 };
96969797- meta = {
9797+ meta = with lib; {
9898 description = "Idris YAML lib";
9999 homepage = "https://github.com/Heather/Idris.Yaml";
100100- license = lib.licenses.mit;
101101- maintainers = [ lib.maintainers.brainrape ];
100100+ license = licenses.mit;
101101+ maintainers = [ maintainers.brainrape ];
102102 };
103103}
104104```
+4-4
doc/languages-frameworks/maven.section.md
···116116> Traditionally the Maven repository is at `~/.m2/repository`. We will override this to be the `$out` directory.
117117118118```nix
119119-{ stdenv, lib, maven }:
119119+{ lib, stdenv, maven }:
120120stdenv.mkDerivation {
121121 name = "maven-repository";
122122 buildInputs = [ maven ];
···168168Regardless of which strategy is chosen above, the step to build the derivation is the same.
169169170170```nix
171171-{ stdenv, lib, maven, callPackage }:
171171+{ stdenv, maven, callPackage }:
172172# pick a repository derivation, here we will use buildMaven
173173let repository = callPackage ./build-maven-repository.nix { };
174174in stdenv.mkDerivation rec {
···222222We make sure to provide this classpath to the `makeWrapper`.
223223224224```nix
225225-{ stdenv, lib, maven, callPackage, makeWrapper, jre }:
225225+{ stdenv, maven, callPackage, makeWrapper, jre }:
226226let
227227 repository = callPackage ./build-maven-repository.nix { };
228228in stdenv.mkDerivation rec {
···298298We will modify the derivation above to add a symlink to our repository so that it's accessible to our JAR during the `installPhase`.
299299300300```nix
301301-{ stdenv, lib, maven, callPackage, makeWrapper, jre }:
301301+{ stdenv, maven, callPackage, makeWrapper, jre }:
302302# pick a repository derivation, here we will use buildMaven
303303let repository = callPackage ./build-maven-repository.nix { };
304304in stdenv.mkDerivation rec {
+3-3
doc/languages-frameworks/ocaml.section.md
···3232 propagatedBuildInputs = [ bigstringaf result ];
3333 doCheck = true;
34343535- meta = {
3535+ meta = with lib; {
3636 homepage = "https://github.com/inhabitedtype/angstrom";
3737 description = "OCaml parser combinators built for speed and memory efficiency";
3838- license = lib.licenses.bsd3;
3939- maintainers = with lib.maintainers; [ sternenseemann ];
3838+ license = licenses.bsd3;
3939+ maintainers = with maintainers; [ sternenseemann ];
4040 };
4141}
4242```
+1-1
doc/languages-frameworks/perl.section.md
···110110On Darwin, if a script has too many `-Idir` flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the `shortenPerlShebang` function from the `postInstall` phase:
111111112112```nix
113113-{ stdenv, lib, buildPerlPackage, fetchurl, shortenPerlShebang }:
113113+{ lib, stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
114114115115ImageExifTool = buildPerlPackage {
116116 pname = "Image-ExifTool";
···3232environment available for other contributors, you can create a `default.nix`
3333file like so:
3434```nix
3535-let
3636- pkgs = import <nixpkgs> {};
3737- stdenv = pkgs.stdenv;
3838-in with pkgs; {
3535+with import <nixpkgs> {};
3636+{
3937 myProject = stdenv.mkDerivation {
4038 name = "myProject";
4139 version = "1";
4242- src = if pkgs.lib.inNixShell then null else nix;
4040+ src = if lib.inNixShell then null else nix;
43414442 buildInputs = with rPackages; [
4543 R
+1-1
doc/languages-frameworks/ruby.section.md
···232232Now you can also also make a `default.nix` that looks like this:
233233234234```nix
235235-{ lib, bundlerApp }:
235235+{ bundlerApp }:
236236237237bundlerApp {
238238 pname = "mdl";
···3636`nixosTests.chromium` (or basic manual testing) and `google-chrome` (which
3737reuses `upstream-info.json`).
38383939+To run all automated NixOS VM tests for Chromium, ungoogled-chromium,
4040+and Google Chrome (not recommended, currently 6x tests!):
4141+```
4242+nix-build nixos/tests/chromium.nix
4343+```
4444+4545+A single test can be selected, e.g. to test `ungoogled-chromium` (see
4646+`channelMap` in `nixos/tests/chromium.nix` for all available options):
4747+```
4848+nix-build nixos/tests/chromium.nix -A ungoogled
4949+```
5050+(Note: Testing Google Chrome requires `export NIXPKGS_ALLOW_UNFREE=1`.)
5151+5252+For custom builds it's possible to "override" `channelMap`.
5353+3954## Backports
40554156All updates are considered security critical and should be ported to the stable
···2525 else "");
2626in stdenv.mkDerivation rec {
2727 pname = "signal-desktop";
2828- version = "1.39.5"; # Please backport all updates to the stable channel.
2828+ version = "1.39.6"; # Please backport all updates to the stable channel.
2929 # All releases have a limited lifetime and "expire" 90 days after the release.
3030 # When releases "expire" the application becomes unusable until an update is
3131 # applied. The expiration date for the current release can be extracted with:
···35353636 src = fetchurl {
3737 url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
3838- sha256 = "1x29ri4jxd1q2wbv5gf26x986x9sms4rxnhj7d5rhm6pz2ihzb2a";
3838+ sha256 = "04fd81vc0dxk0b47crm5zacf4x79pdn483xicygnc1z6v7mnrmgk";
3939 };
40404141 nativeBuildInputs = [
···1111 })
1212 (fetchNuGet {
1313 name = "Eto.Forms";
1414- version = "2.5.6";
1515- sha256 = "035ny8jlanchwq16gcq0xb6ywabjl71c7qbpv26sjwg96na8vz51";
1414+ version = "2.5.10";
1515+ sha256 = "1d71wglk4ixfqfbm6sxmj753x5iwbar8i9zzjy3bh64fy1dn8lz7";
1616 })
1717 (fetchNuGet {
1818 name = "Eto.Platform.Gtk";
1919- version = "2.5.6";
2020- sha256 = "1ijkjd3lc7x59yk369kxipzgk1zhyr9g6k319wc0n033vij26mwl";
1919+ version = "2.5.10";
2020+ sha256 = "1pkqvlfx7bzracnw19bl50i9jg4ym376vihmy9qq7m5z5nfdqn4g";
2121 })
2222 (fetchNuGet {
2323 name = "GdkSharp";
···4141 })
4242 (fetchNuGet {
4343 name = "HidSharpCore";
4444- version = "1.1.0";
4545- sha256 = "122s5j3wrv8hcgnbxrnjqydvcfz7gdm8xq0wlwzrgwdjk44lr45a";
4444+ version = "1.2.1";
4545+ sha256 = "0vcw38skr9g691gxbzv3cf6y9rk11vh5pvcyjshdgii2z1z8a4g2";
4646 })
4747 (fetchNuGet {
4848 name = "MessagePack.Annotations";
···120120 sha256 = "0w2fbji1smd2y7x25qqibf1qrznmv4s6s0jvrbvr6alb7mfyqvh5";
121121 })
122122 (fetchNuGet {
123123- name = "Newtonsoft.Json";
124124- version = "12.0.3";
125125- sha256 = "17dzl305d835mzign8r15vkmav2hq8l6g7942dfjpnzr17wwl89x";
123123+ name = "Octokit";
124124+ version = "0.48.0";
125125+ sha256 = "17ria1shx04rb6knbaswpqndmwam6v3r3lsfsd486q584798ccn8";
126126 })
127127 (fetchNuGet {
128128 name = "PangoSharp";
···205205 sha256 = "1x0g58pbpjrmj2x2qw17rdwwnrcl0wvim2hdwz48lixvwvp22n9c";
206206 })
207207 (fetchNuGet {
208208+ name = "SharpZipLib";
209209+ version = "1.3.1";
210210+ sha256 = "09zypjfils38143da507s5fi4hzvdlz32wfav219hksnpl35y8x0";
211211+ })
212212+ (fetchNuGet {
208213 name = "StreamJsonRpc";
209214 version = "2.6.121";
210215 sha256 = "0xzvpk17w2skndzdg47j7gkrrvw6521db4mv8lc3v8hm97vs9m76";
···230235 sha256 = "16saf1fm9q80bb624fkqz0ksrwpnbw9617d7xg3jib7a2wgagm2r";
231236 })
232237 (fetchNuGet {
233233- name = "System.CommandLine";
234234- version = "2.0.0-beta1.20303.1";
235235- sha256 = "0isnz8ipqlqim06hf56zlaq2vnsy5facvf5nvq6kzm5h1dm3l2vn";
236236- })
237237- (fetchNuGet {
238238 name = "System.ComponentModel.Annotations";
239239 version = "4.7.0";
240240 sha256 = "06x1m46ddxj0ng28d7gry9gjkqdg2kp89jyf480g5gznyybbs49z";
···318318 name = "System.Net.WebSockets";
319319 version = "4.3.0";
320320 sha256 = "1gfj800078kggcgl0xyl00a6y5k4wwh2k2qm69rjy22wbmq7fy4p";
321321- })
322322- (fetchNuGet {
323323- name = "System.Numerics.Vectors";
324324- version = "4.5.0";
325325- sha256 = "1kzrj37yzawf1b19jq0253rcs8hsq1l2q8g69d7ipnhzb0h97m59";
326321 })
327322 (fetchNuGet {
328323 name = "System.Reflection.Emit.Lightweight";
+8
pkgs/tools/X11/opentabletdriver/update.sh
···1414 [[ "${1}" != "--force" ]] && exit 0
1515fi
16161717+# Updating the hash of deb package manually since there seems to be no way to do it automatically
1818+oldDebPkgUrl="https://github.com/InfinityGhost/OpenTabletDriver/releases/download/v${old_version}/OpenTabletDriver.deb";
1919+newDebPkgUrl="https://github.com/InfinityGhost/OpenTabletDriver/releases/download/v${new_version}/OpenTabletDriver.deb";
2020+oldDebSha256=$(nix-prefetch-url "$oldDebPkgUrl")
2121+newDebSha256=$(nix-prefetch-url "$newDebPkgUrl")
2222+echo "oldDebSha256: $oldDebSha256 newDebSha256: $newDebSha256"
2323+sed -i ./default.nix -re "s|\"$oldDebSha256\"|\"$newDebSha256\"|"
2424+1725cd ../../../..
1826update-source-version opentabletdriver "$new_version"
1927store_src="$(nix-build . -A opentabletdriver.src --no-out-link)"
···2222 meta = with lib; {
2323 description = "Redact and strip metadata from documents before publishing";
2424 longDescription = ''
2525- PDF Redact Tools helps with securely redacting and stripping metadata
2626- from documents before publishing. Note that this is not a security tool.
2525+ PDF Redact Tools helps with securely redacting and stripping metadata
2626+ from documents before publishing. Note that this is not a security tool.
2727 It uses ImageMagick to parse PDFs. While ImageMagick is a versatile tool, it has
2828 a history of several security bugs. A malicious PDF could exploit a bug in
2929 ImageMagick to take over your computer. If you're working with potentially