diff options
90 files changed, 619 insertions, 744 deletions
diff --git a/doc/builders/fetchers.chapter.md b/doc/builders/fetchers.chapter.md index 773eb3028ddb..551df86a58f4 100644 --- a/doc/builders/fetchers.chapter.md +++ b/doc/builders/fetchers.chapter.md @@ -163,3 +163,30 @@ or "hg"), `domain` and `fetchSubmodules`. If `fetchSubmodules` is `true`, `fetchFromSourcehut` uses `fetchgit` or `fetchhg` with `fetchSubmodules` or `fetchSubrepos` set to `true`, respectively. Otherwise, the fetcher uses `fetchzip`. + +## `requireFile` {#requirefile} + +`requireFile` allows requesting files that cannot be fetched automatically, but whose content is known. +This is a useful last-resort workaround for license restrictions that prohibit redistribution, or for downloads that are only accessible after authenticating interactively in a browser. +If the requested file is present in the Nix store, the resulting derivation will not be built, because its expected output is already available. +Otherwise, the builder will run, but fail with a message explaining to the user how to provide the file. The following code, for example: + +``` +requireFile { + name = "jdk-${version}_linux-x64_bin.tar.gz"; + url = "https://www.oracle.com/java/technologies/javase-jdk11-downloads.html"; + sha256 = "94bd34f85ee38d3ef59e5289ec7450b9443b924c55625661fffe66b03f2c8de2"; +} +``` +results in this error message: +``` +*** +Unfortunately, we cannot download file jdk-11.0.10_linux-x64_bin.tar.gz automatically. +Please go to https://www.oracle.com/java/technologies/javase-jdk11-downloads.html to download it yourself, and add it to the Nix store +using either + nix-store --add-fixed sha256 jdk-11.0.10_linux-x64_bin.tar.gz +or + nix-prefetch-url --type sha256 file:///path/to/jdk-11.0.10_linux-x64_bin.tar.gz + +*** +``` diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 82916749f9a4..a1ec66e8ef74 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8930,8 +8930,8 @@ githubId = 2914269; name = "Malo Bourgon"; }; - malvo = { - email = "malte@malvo.org"; + malte-v = { + email = "nixpkgs@mal.tc"; github = "malte-v"; githubId = 34393802; name = "Malte Voos"; diff --git a/nixos/modules/services/networking/soju.nix b/nixos/modules/services/networking/soju.nix index d4c4ca47bc80..7f0ac3e3b8e6 100644 --- a/nixos/modules/services/networking/soju.nix +++ b/nixos/modules/services/networking/soju.nix @@ -120,5 +120,5 @@ in }; }; - meta.maintainers = with maintainers; [ malvo ]; + meta.maintainers = with maintainers; [ malte-v ]; } diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index a23a0413160e..7b1159d66715 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -414,7 +414,9 @@ in { mtp = handleTest ./mtp.nix {}; multipass = handleTest ./multipass.nix {}; mumble = handleTest ./mumble.nix {}; - musescore = handleTest ./musescore.nix {}; + # Fails on aarch64-linux at the PDF creation step - need to debug this on an + # aarch64 machine.. + musescore = handleTestOn ["x86_64-linux"] ./musescore.nix {}; munin = handleTest ./munin.nix {}; mutableUsers = handleTest ./mutable-users.nix {}; mxisd = handleTest ./mxisd.nix {}; diff --git a/nixos/tests/musescore.nix b/nixos/tests/musescore.nix index ac2f4ba74c0f..6aeb0558a49d 100644 --- a/nixos/tests/musescore.nix +++ b/nixos/tests/musescore.nix @@ -2,13 +2,12 @@ import ./make-test-python.nix ({ pkgs, ...} : let # Make sure we don't have to go through the startup tutorial - customMuseScoreConfig = pkgs.writeText "MuseScore3.ini" '' + customMuseScoreConfig = pkgs.writeText "MuseScore4.ini" '' [application] - startup\firstStart=false + hasCompletedFirstLaunchSetup=true - [ui] - application\startup\showTours=false - application\startup\showStartCenter=false + [project] + preferredScoreCreationMode=1 ''; in { @@ -40,26 +39,43 @@ in # Inject custom settings machine.succeed("mkdir -p /root/.config/MuseScore/") machine.succeed( - "cp ${customMuseScoreConfig} /root/.config/MuseScore/MuseScore3.ini" + "cp ${customMuseScoreConfig} /root/.config/MuseScore/MuseScore4.ini" ) # Start MuseScore window machine.execute("DISPLAY=:0.0 mscore >&2 &") # Wait until MuseScore has launched - machine.wait_for_window("MuseScore") + machine.wait_for_window("MuseScore 4") # Wait until the window has completely initialised - machine.wait_for_text("MuseScore") + machine.wait_for_text("MuseScore 4") + + machine.screenshot("MuseScore0") + + # Create a new score + machine.send_key("ctrl-n") + + # Wait until the creation wizard appears + machine.wait_for_window("New score") + + machine.screenshot("MuseScore1") + + machine.send_key("tab") + machine.send_key("tab") + machine.send_key("tab") + machine.send_key("tab") + machine.send_key("right") + machine.send_key("right") + machine.send_key("ret") + + machine.sleep(1) - # Start entering notes - machine.send_key("n") # Type the beginning of https://de.wikipedia.org/wiki/Alle_meine_Entchen machine.send_chars("cdef6gg5aaaa7g") - # Make sure the VM catches up with all the keys machine.sleep(1) - machine.screenshot("MuseScore0") + machine.screenshot("MuseScore2") # Go to the export dialogue and create a PDF machine.send_key("alt-f") @@ -67,24 +83,24 @@ in machine.send_key("e") # Wait until the export dialogue appears. - machine.wait_for_window("Export") - machine.screenshot("MuseScore1") - machine.send_key("shift-tab") - machine.sleep(1) + machine.wait_for_text("Export") + + machine.screenshot("MuseScore3") + machine.send_key("shift-tab") machine.sleep(1) machine.send_key("ret") machine.sleep(1) machine.send_key("ret") - machine.screenshot("MuseScore2") + machine.screenshot("MuseScore4") # Wait until PDF is exported - machine.wait_for_file("/root/Documents/MuseScore3/Scores/Untitled.pdf") + machine.wait_for_file('"/root/Documents/MuseScore4/Scores/Untitled score.pdf"') # Check that it contains the title of the score - machine.succeed("pdfgrep Title /root/Documents/MuseScore3/Scores/Untitled.pdf") + machine.succeed('pdfgrep "Untitled score" "/root/Documents/MuseScore4/Scores/Untitled score.pdf"') - machine.screenshot("MuseScore3") + machine.screenshot("MuseScore5") ''; }) diff --git a/nixos/tests/nex |