diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index d70f29745d70..47d418ba77bc 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2622,6 +2622,12 @@ githubId = 82591; name = "Carl Sverre"; }; + carlthome = { + name = "Carl Thomé"; + email = "carlthome@gmail.com"; + github = "carlthome"; + githubId = 1595907; + }; carpinchomug = { email = "aki.suda@protonmail.com"; github = "carpinchomug"; diff --git a/pkgs/applications/blockchains/atomic-swap/default.nix b/pkgs/applications/blockchains/atomic-swap/default.nix new file mode 100644 index 000000000000..3e8ebcc947a9 --- /dev/null +++ b/pkgs/applications/blockchains/atomic-swap/default.nix @@ -0,0 +1,36 @@ +{ lib, buildGoModule, fetchFromGitHub, nix-update-script }: + +let + pname = "atomic-swap"; + version = "0.4.0"; +in +buildGoModule { + inherit pname version; + + src = fetchFromGitHub { + owner = "AthanorLabs"; + repo = "atomic-swap"; + rev = "v${version}"; + hash = "sha256-wVLufTC7WcRELhzebzLgIUvIWklEY+8/C41FluPkya0="; + }; + + vendorSha256 = "sha256-igHuklt76r7MDxz8TAaFgFdQS7L3DJkMYarAMNVYTC4="; + + subPackages = [ + "cmd/swapcli" + "cmd/swapd" + "cmd/bootnode" + ]; + + # integration tests require network access + doCheck = false; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + homepage = "https://github.com/AthanorLabs/atomic-swap"; + description = "ETH-XMR atomic swap implementation"; + license = with licenses; [ gpl3Only ]; + maintainers = with maintainers; [ happysalada ]; + }; +} diff --git a/pkgs/applications/blockchains/bisq-desktop/default.nix b/pkgs/applications/blockchains/bisq-desktop/default.nix index 36bc0ebfb883..46f6b57859c2 100644 --- a/pkgs/applications/blockchains/bisq-desktop/default.nix +++ b/pkgs/applications/blockchains/bisq-desktop/default.nix @@ -9,6 +9,7 @@ , dpkg , writeScript , bash +, strip-nondeterminism , tor , zip , xz @@ -41,7 +42,15 @@ stdenv.mkDerivation rec { sha256 = "0jisxzajsc4wfvxabvfzd0x9y1fxzg39fkhap1781q7wyi4ry9kd"; }; - nativeBuildInputs = [ makeWrapper copyDesktopItems imagemagick dpkg zip xz ]; + nativeBuildInputs = [ + copyDesktopItems + dpkg + imagemagick + makeWrapper + strip-nondeterminism + xz + zip + ]; desktopItems = [ (makeDesktopItem { @@ -64,8 +73,9 @@ stdenv.mkDerivation rec { mkdir -p native/linux/x64/ cp ${bisq-tor} ./tor - tar -cJf native/linux/x64/tor.tar.xz tor + tar --sort=name --mtime="@$SOURCE_DATE_EPOCH" -cJf native/linux/x64/tor.tar.xz tor zip -r opt/bisq/lib/app/desktop-${version}-all.jar native + strip-nondeterminism opt/bisq/lib/app/desktop-${version}-all.jar ''; installPhase = '' diff --git a/pkgs/applications/emulators/pcsx2/default.nix b/pkgs/applications/emulators/pcsx2/default.nix index 59ccbea496cd..a46c02304416 100644 --- a/pkgs/applications/emulators/pcsx2/default.nix +++ b/pkgs/applications/emulators/pcsx2/default.nix @@ -23,6 +23,7 @@ , rapidyaml , SDL2 , soundtouch +, strip-nondeterminism , vulkan-headers , vulkan-loader , wayland @@ -58,7 +59,13 @@ stdenv.mkDerivation rec { "-DDISABLE_BUILD_DATE=TRUE" ]; - nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook zip ]; + nativeBuildInputs = [ + cmake + pkg-config + strip-nondeterminism + wrapQtAppsHook + zip + ]; buildInputs = [ curl @@ -95,6 +102,7 @@ stdenv.mkDerivation rec { install -Dm644 $src/.github/workflows/scripts/linux/pcsx2-qt.desktop $out/share/applications/PCSX2.desktop zip -jq $out/bin/resources/patches.zip ${pcsx2_patches}/patches/* + strip-nondeterminism $out/bin/resources/patches.zip ''; qtWrapperArgs = [ diff --git a/pkgs/applications/misc/ArchiSteamFarm/default.nix b/pkgs/applications/misc/ArchiSteamFarm/default.nix index c7cbf72bc776..0dbcf051c3c9 100644 --- a/pkgs/applications/misc/ArchiSteamFarm/default.nix +++ b/pkgs/applications/misc/ArchiSteamFarm/default.nix @@ -9,15 +9,15 @@ }: buildDotnetModule rec { - pname = "archisteamfarm"; + pname = "ArchiSteamFarm"; # nixpkgs-update: no auto update - version = "5.4.7.2"; + version = "5.4.7.3"; src = fetchFromGitHub { - owner = "justarchinet"; - repo = pname; + owner = "JustArchiNET"; + repo = "ArchiSteamFarm"; rev = version; - hash = "sha256-qKG4eFF/YTb7wlABBtEjOqBYvtVTLKCXqTD9idkhnI4="; + hash = "sha256-xxHNMqFHxFVbKpy9JHHif4GZ/jk9CUUwgyPWmlTXgcc="; }; dotnet-runtime = dotnetCorePackages.aspnetcore_7_0; @@ -56,7 +56,7 @@ buildDotnetModule rec { buildPlugin() { echo "Publishing plugin $1" dotnet publish $1 -p:ContinuousIntegrationBuild=true -p:Deterministic=true \ - --output $out/lib/${pname}/plugins/$1 --configuration Release \ + --output $out/lib/archisteamfarm/plugins/$1 --configuration Release \ -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --no-restore \ --framework=net7.0 } diff --git a/pkgs/applications/networking/mailreaders/caeml/default.nix b/pkgs/applications/networking/mailreaders/caeml/default.nix new file mode 100644 index 000000000000..54b4c7f60cdb --- /dev/null +++ b/pkgs/applications/networking/mailreaders/caeml/default.nix @@ -0,0 +1,30 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: +buildGoModule rec { + pname = "caeml"; + version = "unstable-2023-05-24"; + + src = fetchFromGitHub { + owner = "ferdinandyb"; + repo = pname; + rev = "25dbe10e99aac9b0ce3b80787c162628104f5cd2"; + sha256 = "UIQCNkUyrtMF0IiAfkDvE8siqxNvfFc9TZdlZiTxCVc="; + }; + + vendorHash = "sha256-SDJsRLIGlLv/6NUctCrn6z1IDEmum1Wn5I8RFuwcOe8="; + + meta = with lib; { + description = "cat eml files"; + longDescription = '' + Reads an email file from either STDIN or from a file passed as the first + argument, digests it and outputs it to STDOUT in a more human readable + format. This means only From, To, Cc, Bcc, Date and Subject headers are + kept and these are decoded and of all the parts only text/plain is returned. + ''; + homepage = "https://github.com/ferdinandyb/caeml"; + license = licenses.mit; + maintainers = with maintainers; [ emilytrau ]; + }; +} diff --git a/pkgs/build-support/fetchfirefoxaddon/default.nix b/pkgs/build-support/fetchfirefoxaddon/default.nix index fe9ff5c469ba..41eaa550ea27 100644 --- a/pkgs/build-support/fetchfirefoxaddon/default.nix +++ b/pkgs/build-support/fetchfirefoxaddon/default.nix @@ -1,7 +1,13 @@ -{stdenv, unzip, jq, zip, fetchurl,writeScript, ...}: +{ stdenv +, fetchurl +, jq +, strip-nondeterminism +, unzip +, writeScript +, zip +}: -{ - name +{ name , url ? null , md5 ? "" , sha1 ? "" @@ -14,7 +20,8 @@ let extid = if fixedExtid == null then "nixos@${name}" else fixedExtid; - source = if url == null then src else fetchurl { + source = if url == null then src else + fetchurl { url = url; inherit md5 sha1 sha256 sha512 hash; }; @@ -38,7 +45,14 @@ stdenv.mkDerivation { echo "$NEW_MANIFEST" > "$out/$UUID/manifest.json" cd "$out/$UUID" zip -r -q -FS "$out/$UUID.xpi" * + strip-nondeterminism "$out/$UUID.xpi" rm -r "$out/$UUID" ''; - nativeBuildInputs = [ unzip zip jq ]; + + nativeBuildInputs = [ + jq + strip-nondeterminism + unzip + zip + ]; } diff --git a/pkgs/data/fonts/ibm-plex/default.nix b/pkgs/data/fonts/ibm-plex/default.nix index 21321d83af34..72aac21ea694 100644 --- a/pkgs/data/fonts/ibm-plex/default.nix +++ b/pkgs/data/fonts/ibm-plex/default.nix @@ -2,11 +2,11 @@ stdenvNoCC.mkDerivation rec { pname = "ibm-plex"; - version = "6.2.0"; + version = "6.3.0"; src = fetchzip { url = "https://github.com/IBM/plex/releases/download/v${version}/OpenType.zip"; - hash = "sha256-RvD/aeZrvltJiuAHqYMNaRsjLgTdcC1/5zqlcd4qKAA="; + hash = "sha256-VwJyZMH10FXDxc7T7m8sl7raUlrarSM0Snjruo1ICHU="; }; installPhase = '' diff --git a/pkgs/development/compilers/blueprint/default.nix b/pkgs/development/compilers/blueprint/default.nix index 0016c8a2c7d9..d75d4eeeef16 100644 --- a/pkgs/development/compilers/blueprint/default.nix +++ b/pkgs/development/compilers/blueprint/default.nix @@ -1,23 +1,27 @@ -{ fetchFromGitLab +{ dbus +, fetchFromGitLab , gobject-introspection , gtk4 , lib +, libadwaita +, makeFontsConf , meson , ninja , python3 , stdenv , testers +, xvfb-run }: stdenv.mkDerivation (finalAttrs: { pname = "blueprint-compiler"; - version = "0.6.0"; + version = "0.8.1"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "jwestman"; repo = "blueprint-compiler"; rev = "v${finalAttrs.version}"; - hash = "sha256-L6EGterkZ8EB6xSnJDZ3IMuOumpTpEGnU74X3UgC7k0="; + hash = "sha256-3lj9BMN5aNujbhhZjObdTOCQfH5ERQCgGqIAw5eZIQc="; }; nativeBuildInputs = [ @@ -26,6 +30,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ + libadwaita (python3.withPackages (ps: with ps; [ pygobject3 ])) @@ -36,12 +41,34 @@ stdenv.mkDerivation (finalAttrs: { gobject-introspection ]; - doCheck = true; - nativeCheckInputs = [ + xvfb-run + dbus gtk4 ]; + env = { + # Fontconfig error: Cannot load default config file: No such file: (null) + FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; }; + }; + + doCheck = true; + + preBuild = '' + # Fontconfig error: No writable cache directories + export XDG_CACHE_HOME="$(mktemp -d)" + ''; + + checkPhase = '' + runHook preCheck + + xvfb-run dbus-run-session \ + --config-file=${dbus}/share/dbus-1/session.conf \ + meson test --no-rebuild --print-errorlogs + + runHook postCheck + ''; + passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; @@ -51,6 +78,6 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://gitlab.gnome.org/jwestman/blueprint-compiler"; license = licenses.lgpl3Plus; maintainers = with maintainers; [ benediktbroich ranfdev ]; - platforms = platforms.unix; + platforms = platforms.linux; }; }) diff --git a/pkgs/development/python-modules/asyncssh/default.nix b/pkgs/development/python-modules/asyncssh/default.nix index 0e95beec83e0..3f52c3acd354 100644 --- a/pkgs/development/python-modules/asyncssh/default.nix +++ b/pkgs/development/python-modules/asyncssh/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "asyncssh"; - version = "2.13.1"; + version = "2.13.2"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-67uDwFwLRc8jDeHvLwYFnjYPmvpcPd9g/JL697lP+Ic="; + hash = "sha256-mR5THEu32+xit1SHjZajJGM4qsEaKM48PpkBj7L1gow="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/cson/default.nix b/pkgs/development/python-modules/cson/default.nix new file mode 100644 index 000000000000..c05ad78240c0 --- /dev/null +++ b/pkgs/development/python-modules/cson/default.nix @@ -0,0 +1,26 @@ +{ lib +, buildPythonPackage +, fetchPypi +, speg +}: + +buildPythonPackage rec { + pname = "cson"; + version = "0.8"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-7owBZvzR9ReJiHGX4+g1Sse++jlvwpcGvOta8l7cngE="; + }; + + propagatedBuildInputs = [ speg ]; + + pythonImportChecks = [ "cson" ]; + + meta = with lib; { + description = "A python parser for the Coffeescript Object Notation (CSON)"; + homepage = "https://github.com/avakar/pycson"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ xworld21 ]; + }; +} diff --git a/pkgs/development/python-modules/mir_eval/default.nix b/pkgs/development/python-modules/mir_eval/default.nix new file mode 100644 index 000000000000..eaf4a9e4f535 --- /dev/null +++ b/pkgs/development/python-modules/mir_eval/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchPypi +, future +, six +, numpy +, scipy +, matplotlib +}: + +buildPythonPackage rec { + pname = "mir_eval"; + version = "0.7"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-4f66pXZsZadUXCoXCyQUkPR6mJhzcLHgZ0JCTF3r5l4="; + }; + + propagatedBuildInputs = [ + future + six + numpy + scipy + matplotlib + ]; + + pythonImportsCheck = [ + "mir_eval" + ]; + + meta = with lib; { + description = "Common metrics for common audio/music processing tasks"; + homepage = "https://github.com/craffel/mir_eval"; + license = licenses.mit; + maintainers = with maintainers; [ carlthome ]; + }; +} diff --git a/pkgs/development/python-modules/speg/default.nix b/pkgs/development/python-modules/speg/default.nix new file mode 100644 index 000000000000..83bdc1e5b046 --- /dev/null +++ b/pkgs/development/python-modules/speg/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, speg +}: + +buildPythonPackage rec { + pname = "speg"; + version = "0.3"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-EMvvR+Fo38YvFNtXXPHEKAN6K4gc7mw8/O2gQ5wkPnE="; + extension = "zip"; + }; + + pythonImportChecks = [ "speg" ]; + + # checks fail for seemingly spurious reasons + doCheck = false; + + meta = with lib; { + description = "A PEG-based parser interpreter with memoization (in time)"; + homepage = "https://github.com/avakar/speg"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ xworld21 ]; + }; +} diff --git a/pkgs/development/python-modules/wxPython/4.2.nix b/pkgs/development/python-modules/wxPython/4.2.nix index 3d4ddb1e7061..0ed40b8a9173 100644 --- a/pkgs/development/python-modules/wxPython/4.2.nix +++ b/pkgs/development/python-modules/wxPython/4.2.nix @@ -41,13 +41,13 @@ buildPythonPackage rec { pname = "wxPython"; - version = "4.2.0"; + version = "4.2.1"; format = "other"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-ZjzrxFCdfl0RNRiGX+J093+VQ0xdV7w4btWNZc7thsc="; + hash = "sha256-5I3iEaZga/By7D+neHcda3RsALf0uXDrWHKN31bRPVw="; }; patches = [ @@ -127,6 +127,7 @@ buildPythonPackage rec { meta = with lib; { + changelog = "https://github.com/wxWidgets/Phoenix/blob/wxPython-${version}/CHANGES.rst"; description = "Cross platform GUI toolkit for Python, Phoenix version"; homepage = "http://wxpython.org/"; license = licenses.wxWindows; diff --git a/pkgs/development/tools/slimerjs/default.nix b/pkgs/development/tools/slimerjs/default.nix index 7ebe7dba8512..f800dedf615f 100644 --- a/pkgs/development/tools/slimerjs/default.nix +++ b/pkgs/development/tools/slimerjs/default.nix @@ -1,4 +1,12 @@ -{ lib, stdenv, fetchFromGitHub, zip, unzip, firefox, bash }: +{ lib +, bash +, fetchFromGitHub +, firefox +, strip-nondeterminism +, stdenv +, unzip +, zip +}: stdenv.mkDerivation rec { pname = "slimerjs"; @@ -12,7 +20,10 @@ stdenv.mkDerivation rec { }; buildInputs = [ zip ]; - nativeBuildInputs = [ unzip ]; + nativeBuildInputs = [ + strip-nondeterminism + unzip + ]; preConfigure = '' test -d src && cd src @@ -20,6 +31,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' + strip-nondeterminism --type zip omni.ja mkdir -p "$out"/{bin,share/doc/slimerjs,lib/slimerjs} cp LICENSE README* "$out/share/doc/slimerjs" cp -r * "$out/lib/slimerjs" diff --git a/pkgs/games/mari0/default.nix b/pkgs/games/mari0/default.nix index 9541b97476c1..6e644245c4fb 100644 --- a/pkgs/games/mari0/default.nix +++ b/pkgs/games/mari0/default.nix @@ -1,5 +1,13 @@ -{ lib, stdenv, fetchFromGitHub, zip, love, makeWrapper, makeDesktopItem -, copyDesktopItems }: +{ lib +, copyDesktopItems +, fetchFromGitHub +, love +, makeDesktopItem +, makeWrapper +, stdenv +, strip-nondeterminism +, zip +}: stdenv.mkDerivation rec { pname = "mari0"; @@ -12,7 +20,12 @@ stdenv.mkDerivation rec { sha256 = "1zqaq4w599scsjvy1rsb21fd2r8j3srx9vym4ir9bh666dp36gxa"; }; - nativeBuildInputs = [ makeWrapper copyDesktopItems zip ]; + nativeBuildInputs = [ + copyDesktopItems + makeWrapper + strip-nondeterminism + zip + ]; desktopItems = [ (makeDesktopItem { @@ -28,6 +41,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall zip -9 -r mari0.love ./* + strip-nondeterminism --type zip mari0.love install -Dm444 -t $out/share/games/lovegames/ mari0.love makeWrapper ${love}/bin/love $out/bin/mari0 \ --add-flags $out/share/games/lovegames/mari0.love diff --git a/pkgs/games/orthorobot/default.nix b/pkgs/games/orthorobot/default.nix index 5fc11d212514..6ca70596458d 100644 --- a/pkgs/games/orthorobot/default.nix +++ b/pkgs/games/orthorobot/default.nix @@ -1,5 +1,15 @@ -{ lib, stdenv, fetchurl, fetchFromGitHub, love, zip, fetchpatch, makeWrapper -, makeDesktopItem, copyDesktopItems }: +{ lib +, copyDesktopItems +, fetchFromGitHub +, fetchpatch +, fetchurl +, love +, makeDesktopItem +, makeWrapper +, stdenv +, strip-nondeterminism +, zip +}: stdenv.mkDerivation rec { pname = "orthorobot"; @@ -29,7 +39,12 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = [ makeWrapper zip copyDesktopItems ]; + nativeBuildInputs = [ + copyDesktopItems + makeWrapper + strip-nondeterminism + zip + ]; patches = [ # support for love11 @@ -42,6 +57,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall zip -9 -r orthorobot.love ./* + strip-nondeterminism --type zip orthorobot.love install -Dm444 -t $out/share/games/lovegames/ orthorobot.love makeWrapper ${love}/bin/love $out/bin/orthorobot \ --add-flags $out/share/games/lovegames/orthorobot.love diff --git a/pkgs/games/wireworld/default.nix b/pkgs/games/wireworld/default.nix index 5528b52a280a..828d313d2a87 100644 --- a/pkgs/games/wireworld/default.nix +++ b/pkgs/games/wireworld/default.nix @@ -6,6 +6,7 @@ , makeWrapper , makeDesktopItem , copyDesktopItems +, strip-nondeterminism }: stdenv.mkDerivation rec { @@ -19,7 +20,12 @@ stdenv.mkDerivation rec { hash = "sha256-8BshnGLuA8lmG9g7FU349DWKP/fZvlvjrQBau/LSJ4E="; }; - nativeBuildInputs = [ makeWrapper copyDesktopItems zip ]; + nativeBuildInputs = [ + copyDesktopItems + makeWrapper + strip-nondeterminism + zip + ]; desktopItems = [ (makeDesktopItem { @@ -35,6 +41,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall zip -9 -r Wireworld.love ./* + strip-nondeterminism --type zip Wireworld.love install -Dm444 -t $out/share/games/lovegames/ Wireworld.love makeWrapper ${love}/bin/love $out/bin/Wireworld \ --add-flags $out/share/games/lovegames/Wireworld.love diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix index f06db98a8efe..65b052c44569 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix @@ -1,13 +1,14 @@ +{ +}: + rec { name = "stage0-posix-${version}-${rev}-source"; # Pinned from https://github.com/oriansj/stage0-posix/commit/3189b5f325b7ef8b88e3edec7c1cde4fce73c76c version = "unstable-2023-05-02"; rev = "3189b5f325b7ef8b88e3edec7c1cde4fce73c76c"; + outputHashAlgo = "sha256"; # This 256 byte seed is the only pre-compiled binary in the bootstrap chain. - # While it is included in the stage0-posix source bundle and is synced with - # stage0-posix updates, we have split it out into its own derivation to highlight - # its unique status as a trusted binary seed. hex0-seed = import { name = "hex0-seed-${version}"; url = "https://github.com/oriansj/bootstrap-seeds/raw/b1263ff14a17835f4d12539226208c426ced4fba/POSIX/x86/hex0-seed"; @@ -15,20 +16,91 @@ rec { executable = true; }; - # Packaged resources required for the first bootstrapping stage. - # Contains source code and 256-byte hex0 binary seed. - # - # We don't have access to utilities such as fetchgit and fetchzip since this - # is this is part of the bootstrap process and would introduce a circular - # dependency. The only tool we have to fetch source trees is `import ` - # with the unpack option, taking a NAR file as input. This requires source - # tarballs to be repackaged. - # - # To build see `make-bootstrap-sources.nix` - src = import { - inherit name; - url = "https://github.com/emilytrau/bootstrap-tools-nar-mirror/releases/download/2023-05-02/${name}.nar.xz"; - hash = "sha256-ZRG0k49MxL1UTZhuMTvPoEprdSpJRNVy8QhLE6k+etg="; - unpack = true; + /* + Since `make-minimal-bootstrap-sources` requires nixpkgs and nix it + will create a circular dependency if it is used in place of the + binary bootstrap-files. To break the circular dependency, + `minimal-bootstrap-sources` extends `make-minimal-bootstrap-sources` + by adding Fixed Output Derivation (FOD) attributes. These cause + the builder to be skipped if the expected output is found (by + its hash) in the store or on a substituter. + + # How do I update the hash? + + Run the following command: + ``` + nix hash file $(nix build --print-out-paths -f '' make-minimal-bootstrap-sources) + ``` + + # Why do we need this `.nar` archive? + + This archive exists only because of a quirk/limitation of Nix: in + restricted mode the builtin fetchers can download only single + files; they have no way to unpack multi-file archives except for + NAR archives: + + https://github.com/NixOS/nixpkgs/pull/232576#issuecomment-1592415619 + + # Why don't we have to upload this to tarballs.nixos.org like the binary bootstrap-files did? + + Unlike this archive, the binary bootstrap-files contained binaries, + which meant that we had to: + + 1. Make sure they came from a trusted builder (Hydra) + 2. Keep careful track of exactly what toolchain (i.e. nixpkgs + commit) that builder used to create them. + 3. Keep copies of the built binaries, in case the toolchains that + produced them failed to be perfectly deterministic. + + The curated archives at tarballs.nixos.org exist in order to + satisfy these requirements. + + The second point created a significant burden: since the nixpkgs + toolchain used to build a given copy of the binary bootstrap-files + itself used a *previous* copy of the bootstrap-files, this meant + we had to track the provenance of all bootstrap-files tarballs + ever used, for all eternity. There was no explanation of where + the "original" bootstrap-files came from: turtles all the way + down. In spite of all this effort we still can't be sure of our + ability to reproduce the binary bootstrap-files, since the + compilers that built them don't always produce exactly bit-for-bit + deterministic results. + + Since this archive contains no binaries and uses a format (NAR) + specifically designed for bit-exact reproducibility, none of the + requirements above apply to `minimal-bootstrap-sources`. + */ + minimal-bootstrap-sources = derivation { + name = "${name}.nar.xz"; + system = builtins.currentSystem; + outputHashMode = "flat"; + inherit outputHashAlgo; + outputHash = "sha256-ig988BiRTz92hhZZgKQW1tVPoV4aQ2D69Cq3wHvVgHg="; + + # This builder always fails, but fortunately Nix will print the + # "builder", which is really the error message that we want the + # user to see. + builder = '' + # + # + # Neither your store nor your substituters seems to have: + # + # ${name}.nar.xz + # + # Please obtain or create this file, give it exactly the name + # shown above, and then run the following command: + # + # nix-store --add-fixed ${outputHashAlgo} ${name}.nar.xz + # + # You can create this file from an already-bootstrapped nixpkgs + # using the following command: + # + # nix-build '' -A make-minimal-bootstrap-sources + # + # Or, if you prefer, you can create this file using only `git`, + # `nix`, and `xz`. For the commands needed in order to do this, + # see `make-bootstrap-sources.nix`. + # + ''; }; } diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/default.nix index 2b41261add3a..c15223a43d48 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/default.nix @@ -3,7 +3,10 @@ }: lib.makeScope newScope (self: with self; { - inherit (import ./bootstrap-sources.nix) version hex0-seed src; + inherit (self.callPackage ./bootstrap-sources.nix {}) + version hex0-seed minimal-bootstrap-sources; + + src = minimal-bootstrap-sources; m2libc = src + "/M2libc"; diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/hex0.nix b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/hex0.nix index 43859b966add..b85b2f2cac14 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/hex0.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/hex0.nix @@ -9,7 +9,7 @@ derivationWithMeta { pname = "hex0"; builder = hex0-seed; args = [ - "${src}/bootstrap-seeds/POSIX/x86/hex0_x86.hex0" + "${src}/x86/hex0_x86.hex0" (placeholder "out") ]; diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/minimal.nix b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/minimal.nix index e85efbbb0243..24fc77f8d345 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/minimal.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/minimal.nix @@ -9,7 +9,7 @@ derivationWithMeta { pname = "kaem-minimal"; builder = hex0; args = [ - "${src}/bootstrap-seeds/POSIX/x86/kaem-minimal.hex0" + "${src}/x86/kaem-minimal.hex0" (placeholder "out") ]; diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix index fec03f370bc3..8951cc9ddbc4 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix @@ -1,5 +1,4 @@ -# Packaged resources required for the first bootstrapping stage. -# Contains source code and 256-byte hex0 binary seed. +# Packaged source files for the first bootstrapping stage. # # We don't have access to utilities such as fetchgit and fetchzip since this # is this is part of the bootstrap process and would introduce a circular @@ -9,23 +8,29 @@ # # To build: # -# nix-build pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix -# => ./result/stage0-posix-$version-$rev-source.nar.xz +# nix-build '' -o sources.nar.xz -A make-minimal-bootstrap-sources # -{ pkgs ? import ../../../../.. {} }: +{ lib +, fetchFromGitHub +, runCommand +, nix +, xz +}: let - inherit (pkgs) callPackage runCommand fetchFromGitHub nix xz; - - inherit (import ./bootstrap-sources.nix) name rev; + inherit (import ./bootstrap-sources.nix { }) name rev; src = fetchFromGitHub { owner = "oriansj"; repo = "stage0-posix"; inherit rev; - sha256 = "sha256-ZRG0k49MxL1UTZhuMTvPoEprdSpJRNVy8QhLE6k+etg="; + sha256 = "sha256-FpMp7z+B3cR3LkQ+PooH/b1/NlxH8NHVJNWifaPWt4U="; fetchSubmodules = true; postFetch = '' + # Seed binaries will be fetched separately + echo "Removing seed binaries" + rm -rf $out/bootstrap-seeds/* + # Remove vendored/duplicate M2libc's echo "Removing duplicate M2libc" rm -rf \ @@ -35,12 +40,20 @@ let $out/mescc-tools-extra/M2libc ''; }; + in -runCommand name { +runCommand "${name}.nar.xz" { nativeBuildInputs = [ nix xz ]; passthru = { inherit src; }; + + meta = with lib; { + description = "Packaged sources for the first bootstrapping stage"; + homepage = "https://github.com/oriansj/stage0-posix"; + license = licenses.gpl3Plus; + maintainers = teams.minimal-bootstrap.members; + platforms = platforms.all; + }; } '' - mkdir $out - nix-store --dump ${src} | xz -c > "$out/${name}.nar.xz" + nix-store --dump ${src} | xz -c > $out '' diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index 9950d3c56f99..795378d370c2 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -1,8 +1,8 @@ { lib, stdenv, fetchFromGitHub, fetchurl, fetchpatch -, autoreconfHook, bison, glm, flex +, autoreconfHook, bison, glm, flex, wrapQtAppsHook, cmake , freeglut, ghostscriptX, imagemagick, fftw , boehmgc, libGLU, libGL, mesa, ncurses, readline, gsl, libsigsegv -, python3Packages +, python3, qtbase, qtsvg, boost , zlib, perl, curl , texLive, texinfo , darwin @@ -25,17 +25,17 @@ stdenv.mkDerivation rec { flex bison texinfo + wrapQtAppsHook + cmake ]; buildInputs = [ ghostscriptX imagemagick fftw boehmgc ncurses readline gsl libsigsegv - zlib perl curl + zlib perl curl qtbase qtsvg boost texLive - ] ++ (with python3Packages; [ - python - pyqt5 - ]); + (python3.withPackages (ps: with ps; [ cson numpy pyqt5 ])) + ]; propagatedBuildInputs = [ glm @@ -45,6 +45,8 @@ stdenv.mkDerivation rec { OpenGL GLUT Cocoa ]); + dontWrapQtApps = true; + preConfigure = '' HOME=$TMP ''; @@ -57,6 +59,9 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc"; postInstall = '' + rm "$out"/bin/xasy + makeQtWrapper "$out"/share/asymptote/GUI/xasy.py "$out"/bin/xasy --prefix PATH : "$out"/bin + mv $out/share/info/asymptote/*.info $out/share/info/ sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info rmdir $out/share/info/asymptote @@ -66,6 +71,8 @@ stdenv.mkDerivation rec { install -Dt $out/share/emacs/site-lisp/${pname} $out/share/asymptote/*.el ''; + dontUseCmakeConfigure = true; + enableParallelBuilding = true; # Missing install depends: # ...-coreutils-9.1/bin/install: cannot stat 'asy-keywords.el': No such file or directory diff --git a/pkgs/tools/misc/kicli/default.nix b/pkgs/tools/misc/kicli/default.nix new file mode 100644 index 000000000000..76516f4e4ac3 --- /dev/null +++ b/pkgs/tools/misc/kicli/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, nix-update-script +}: +buildGoModule rec { + pname = "kicli"; + version = "0.0.3"; + + src = fetchFromGitHub { + owner = "anned20"; + repo = pname; + rev = "v${version}"; + hash = "sha256-Mt1lHOC8gBcLQ6kArUvlPrH+Y/63mIQTCsUY2UTJE2c="; + }; + + vendorHash = "sha256-+8L/9NJ3dzP4k+LXkPD208uFGeARv7aT39bhH+R08e0="; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + homepage = "https://github.com/anned20/kicli"; + description = "CLI interface to the Kimai time tracking project"; + license = licenses.mit; + maintainers = with maintainers; [ poelzi ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/tools/misc/otel-cli/default.nix b/pkgs/tools/misc/otel-cli/default.nix index b9efcd250286..992dd9c71d16 100644 --- a/pkgs/tools/misc/otel-cli/default.nix +++ b/pkgs/tools/misc/otel-cli/default.nix @@ -1,23 +1,23 @@ -{ lib, bash, buildGoModule, fetchFromGitHub, getent, nix-update-script, stdenv }: +{ lib, bash, buildGoModule, fetchFromGitHub, getent, coreutils, nix-update-script, stdenv }: buildGoModule rec { pname = "otel-cli"; - version = "0.2.0"; + version = "0.3.0"; src = fetchFromGitHub { owner = "equinix-labs"; repo = pname; rev = "v${version}"; - hash = "sha256-hez/jHet7W4FnOjgLb0jE1FhoNimiLGaOuTI44UWbSA="; + hash = "sha256-edxDPxUamZiBezMj2SII/zq8atnyZVWtboUJsShDAyw="; }; - vendorHash = "sha256-gVRgqBgiFnPU6MRZi/Igs7nDPMwJYsdln7vPAcxTvPU="; + vendorHash = "sha256-MlLFTi+O925NA73zDRrk0AgJzwtdNBhCxDjmniNPwio="; preCheck = '' ln -s $GOPATH/bin/otel-cli . '' + lib.optionalString (!stdenv.isDarwin) '' substituteInPlace main_test.go \ - --replace 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent ]}`' + --replace 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent coreutils ]}`' ''; passthru.updateScript = nix-update-script {}; diff --git a/pkgs/tools/misc/pridefetch/default.nix b/pkgs/tools/misc/pridefetch/default.nix index 80fd1b0e9bc2..22e5c7a0afb2 100644 --- a/pkgs/tools/misc/pridefetch/default.nix +++ b/pkgs/tools/misc/pridefetch/default.nix @@ -1,4 +1,12 @@ -{ lib, stdenv, fetchFromGitHub, python3, zip }: let +{ lib +, fetchFromGitHub +, python3 +, stdenv +, strip-nondeterminism +, zip +}: + +let version = "1.1.0"; sha256 = "sha256-563xOz63vto19yuaHtReV1dSw6BgNf+CLtS3lrPnaoc="; @@ -9,25 +17,33 @@ rev = "v" + version; inherit sha256; }; -in stdenv.mkDerivation { +in + +stdenv.mkDerivation { inherit pname version src; + nativeBuildInputs = [ + strip-nondeterminism zip ]; + buildInputs = [ (python3.withPackages (pythonPackages: with pythonPackages; [ distro ])) ]; + buildPhase = '' runHook preBuild pushd src zip -r ../pridefetch.zip ./* + strip-nondeterminism ../pridefetch.zip popd echo '#!/usr/bin/env python' | cat - pridefetch.zip > pridefetch rm pridefetch.zip runHook postBuild ''; + installPhase = '' runHook preInstall mkdir -p $out/bin @@ -35,6 +51,7 @@ in stdenv.mkDerivation { chmod +x $out/bin/pridefetch runHook postInstall ''; + meta = with lib; { description = "Print out system statistics with pride flags"; longDescription = '' diff --git a/pkgs/tools/text/textpieces/default.nix b/pkgs/tools/text/textpieces/default.nix index 7b20083a80bf..d9bd7a07b828 100644 --- a/pkgs/tools/text/textpieces/default.nix +++ b/pkgs/tools/text/textpieces/default.nix @@ -10,6 +10,7 @@ , gtk4 , libgee , libadwaita +, libportal-gtk4 , json-glib , blueprint-compiler , gtksourceview5 @@ -20,17 +21,17 @@ }: let - pythonEnv = python3.withPackages ( ps: with ps; [ pyyaml ] ); + pythonEnv = python3.withPackages (ps: with ps; [ pyyaml ]); in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "textpieces"; - version = "3.4.0"; + version = "3.4.1"; src = fetchFromGitHub { owner = "liferooter"; - repo = pname; - rev = "v${version}"; - hash = "sha256-LQq6pjue72a4kIHhWtoxJi/eKxPa4du5sBQY97SG1gY="; + repo = "textpieces"; + rev = "v${finalAttrs.version}"; + hash = "sha256-3ZUHzt3oXYgsnJVDf83JUDhcF+0DLgFfOMtpKI/FTcE="; }; nativeBuildInputs = [ @@ -49,6 +50,7 @@ stdenv.mkDerivation rec { glib gtk4 libadwaita + libportal-gtk4 libgee json-glib gtksourceview5 @@ -72,5 +74,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.linux; maintainers = with maintainers; [ zendo ]; + broken = true; # https://github.com/liferooter/textpieces/issues/130 }; -} +}) diff --git a/pkgs/tools/wayland/wl-screenrec/default.nix b/pkgs/tools/wayland/wl-screenrec/default.nix new file mode 100644 index 000000000000..8f09b806f6af --- /dev/null +++ b/pkgs/tools/wayland/wl-screenrec/default.nix @@ -0,0 +1,39 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, pkg-config +, wayland +, ffmpeg +}: + +rustPlatform.buildRustPackage rec { + pname = "wl-screenrec"; + version = "unstable-2023-05-31"; + + src = fetchFromGitHub { + owner = "russelltg"; + repo = pname; + rev = "fc918f7898900c1882c6f64c96ed2de8cb9a6300"; + hash = "sha256-P/JELiw0qGcwLFgNPccN/uetNy8CNCJdlCLhgq0h4sc="; + }; + + cargoHash = "sha256-r9zmAiLiAntHcb5W/WKmKbVP9c9+15ElIWtHkks0wig="; + + nativeBuildInputs = [ + pkg-config + rustPlatform.bindgenHook + ]; + + buildInputs = [ + wayland + ffmpeg + ]; + + meta = with lib; { + description = "High performance wlroots screen recording, featuring hardware encoding"; + homepage = "https://github.com/russelltg/wl-screenrec"; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ colemickens ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 06a783eecbd3..707aeb5f6085 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -316,6 +316,8 @@ with pkgs; atomic-operator = callPackage ../tools/security/atomic-operator { }; + atomic-swap = callPackage ../applications/blockchains/atomic-swap { }; + avro-tools = callPackage ../development/tools/avro-tools { }; bacnet-stack = callPackage ../tools/networking/bacnet-stack { }; @@ -1679,6 +1681,8 @@ with pkgs; kaufkauflist = callPackage ../applications/misc/kaufkauflist { }; + kicli = callPackage ../tools/misc/kicli { }; + ksmbd-tools = callPackage ../os-specific/linux/ksmbd-tools { }; ksnip = libsForQt5.callPackage ../tools/misc/ksnip { }; @@ -3026,7 +3030,7 @@ with pkgs; astc-encoder = callPackage ../tools/graphics/astc-encoder { }; - asymptote = callPackage ../tools/graphics/asymptote { + asymptote = libsForQt5.callPackage ../tools/graphics/asymptote { texLive = texlive.combine { inherit (texlive) scheme-small epsf cm-super texinfo media9 ocgx2 collection-latexextra; }; }; @@ -4498,6 +4502,8 @@ with pkgs; wl-mirror = callPackage ../tools/wayland/wl-mirror { }; + wl-screenrec = callPackage ../tools/wayland/wl-screenrec { }; + wlogout = callPackage ../tools/wayland/wlogout { }; wlopm = callPackage ../tools/wayland/wlopm { }; @@ -6654,6 +6660,8 @@ with pkgs; bombardier = callPackage ../tools/networking/bombardier { }; + caeml = callPackage ../applications/networking/mailreaders/caeml { }; + calyx-vpn = libsForQt5.callPackage ../tools/networking/bitmask-vpn { provider = "calyx"; inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; @@ -27557,6 +27565,8 @@ with pkgs; }; checkMeta = callPackage ../stdenv/generic/check-meta.nix { }; }); + minimal-bootstrap-sources = callPackage ../os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix { }; + make-minimal-bootstrap-sources = callPackage ../os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix { }; mingetty = callPackage ../os-specific/linux/mingetty { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eade2a479705..3e2540841e3d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2211,6 +2211,8 @@ self: super: with self; { crytic-compile = callPackage ../development/python-modules/crytic-compile { }; + cson = callPackage ../development/python-modules/cson { }; + csrmesh = callPackage ../development/python-modules/csrmesh { }; csscompressor = callPackage ../development/python-modules/csscompressor { }; @@ -6318,6 +6320,8 @@ self: super: with self; { mip = callPackage ../development/python-modules/mip { }; + mir_eval = callPackage ../development/python-modules/mir_eval { }; + misaka = callPackage ../development/python-modules/misaka { }; misoc = callPackage ../development/python-modules/misoc { }; @@ -11538,6 +11542,8 @@ self: super: with self; { speedtest-cli = callPackage ../development/python-modules/speedtest-cli { }; + speg = callPackage ../development/python-modules/speg { }; + spglib = callPackage ../development/python-modules/spglib { }; sphfile = callPackage ../development/python-modules/sphfile { };