diff options
author | Atemu <atemu.main@gmail.com> | 2023-04-11 12:52:27 +0200 |
---|---|---|
committer | Atemu <atemu.main@gmail.com> | 2023-04-16 10:15:13 +0200 |
commit | f63a12f296b806a1b838d6fd8eef99fa65929649 (patch) | |
tree | bf9627db4a9a4a265dfccfef4e43338606d9c3e5 | |
parent | 1baab4e14a6c9d5fd0f3e6af144aeeb61e911110 (diff) |
tree-wide: buildFHSUserEnv -> buildFHSEnv
60 files changed, 114 insertions, 110 deletions
diff --git a/doc/builders/special/fhs-environments.section.md b/doc/builders/special/fhs-environments.section.md index cacad261e28ff..0adacb59cfd43 100644 --- a/doc/builders/special/fhs-environments.section.md +++ b/doc/builders/special/fhs-environments.section.md @@ -1,6 +1,6 @@ -# buildFHSUserEnv {#sec-fhs-environments} +# buildFHSEnv {#sec-fhs-environments} -`buildFHSUserEnv` provides a way to build and run FHS-compatible lightweight sandboxes. It creates an isolated root with bound `/nix/store`, so its footprint in terms of disk space needed is quite small. This allows one to run software which is hard or unfeasible to patch for NixOS -- 3rd-party source trees with FHS assumptions, games distributed as tarballs, software with integrity checking and/or external self-updated binaries. It uses Linux namespaces feature to create temporary lightweight environments which are destroyed after all child processes exit, without root user rights requirement. Accepted arguments are: +`buildFHSEnv` provides a way to build and run FHS-compatible lightweight sandboxes. It creates an isolated root with bound `/nix/store`, so its footprint in terms of disk space needed is quite small. This allows one to run software which is hard or unfeasible to patch for NixOS -- 3rd-party source trees with FHS assumptions, games distributed as tarballs, software with integrity checking and/or external self-updated binaries. It uses Linux namespaces feature to create temporary lightweight environments which are destroyed after all child processes exit, without root user rights requirement. Accepted arguments are: - `name` Environment name. @@ -26,7 +26,7 @@ One can create a simple environment using a `shell.nix` like that: ```nix { pkgs ? import <nixpkgs> {} }: -(pkgs.buildFHSUserEnv { +(pkgs.buildFHSEnv { name = "simple-x11-env"; targetPkgs = pkgs: (with pkgs; [ udev diff --git a/nixos/doc/manual/configuration/adding-custom-packages.section.md b/nixos/doc/manual/configuration/adding-custom-packages.section.md index 9219396722f03..89d329550613c 100644 --- a/nixos/doc/manual/configuration/adding-custom-packages.section.md +++ b/nixos/doc/manual/configuration/adding-custom-packages.section.md @@ -94,6 +94,6 @@ environment.systemPackages = [ pkgs.appimage-run ]; Then instead of running the AppImage "as-is", run `appimage-run foo.appimage`. To make other pre-built executables work on NixOS, you need to package them -with Nix and special helpers like `autoPatchelfHook` or `buildFHSUserEnv`. See +with Nix and special helpers like `autoPatchelfHook` or `buildFHSEnv`. See the [Nixpkgs manual](https://nixos.org/nixpkgs/manual) for details. This is complex and often doing a source build is easier. diff --git a/nixos/modules/services/computing/boinc/client.nix b/nixos/modules/services/computing/boinc/client.nix index 5fb715f4d779a..1879fef9666f7 100644 --- a/nixos/modules/services/computing/boinc/client.nix +++ b/nixos/modules/services/computing/boinc/client.nix @@ -6,7 +6,7 @@ let cfg = config.services.boinc; allowRemoteGuiRpcFlag = optionalString cfg.allowRemoteGuiRpc "--allow_remote_gui_rpc"; - fhsEnv = pkgs.buildFHSUserEnv { + fhsEnv = pkgs.buildFHSEnv { name = "boinc-fhs-env"; targetPkgs = pkgs': [ cfg.package ] ++ cfg.extraEnvPackages; runScript = "/bin/boinc_client"; diff --git a/pkgs/applications/blockchains/sparrow/fhsenv.nix b/pkgs/applications/blockchains/sparrow/fhsenv.nix index a82b975227c14..ae14e6e4a591e 100644 --- a/pkgs/applications/blockchains/sparrow/fhsenv.nix +++ b/pkgs/applications/blockchains/sparrow/fhsenv.nix @@ -1,9 +1,9 @@ { lib -, buildFHSUserEnv +, buildFHSEnv , sparrow-unwrapped }: -buildFHSUserEnv { +buildFHSEnv { name = "sparrow"; runScript = "${sparrow-unwrapped}/bin/sparrow"; diff --git a/pkgs/applications/editors/android-studio/common.nix b/pkgs/applications/editors/android-studio/common.nix index 418745ffb4663..7560f5191e8b6 100644 --- a/pkgs/applications/editors/android-studio/common.nix +++ b/pkgs/applications/editors/android-studio/common.nix @@ -2,7 +2,7 @@ { alsa-lib , bash -, buildFHSUserEnv +, buildFHSEnv , cacert , coreutils , dbus @@ -178,7 +178,7 @@ let # Android Studio downloads prebuilt binaries as part of the SDK. These tools # (e.g. `mksdcard`) have `/lib/ld-linux.so.2` set as the interpreter. An FHS # environment is used as a work around for that. - fhsEnv = buildFHSUserEnv { + fhsEnv = buildFHSEnv { name = "${drvName}-fhs-env"; multiPkgs = pkgs: [ ncurses5 diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index 664199553ddf9..abadb183b91f1 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -1,4 +1,4 @@ -{ callPackage, makeFontsConf, gnome2, buildFHSUserEnv, tiling_wm ? false }: +{ callPackage, makeFontsConf, gnome2, buildFHSEnv, tiling_wm ? false }: let mkStudio = opts: callPackage (import ./common.nix opts) { @@ -6,7 +6,7 @@ let fontDirectories = []; }; inherit (gnome2) GConf gnome_vfs; - inherit buildFHSUserEnv; + inherit buildFHSEnv; inherit tiling_wm; }; stableVersion = { diff --git a/pkgs/applications/editors/quartus-prime/default.nix b/pkgs/applications/editors/quartus-prime/default.nix index 50eacf97bf850..fdfb7663135b4 100644 --- a/pkgs/applications/editors/quartus-prime/default.nix +++ b/pkgs/applications/editors/quartus-prime/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, buildFHSUserEnv, callPackage, makeDesktopItem, writeScript +{ stdenv, lib, buildFHSEnv, callPackage, makeDesktopItem, writeScript , supportedDevices ? [ "Arria II" "Cyclone V" "Cyclone IV" "Cyclone 10 LP" "MAX II/V" "MAX 10 FPGA" ] , unwrapped ? callPackage ./quartus.nix { inherit supportedDevices; } }: @@ -13,7 +13,7 @@ let categories = [ "Development" ]; }; # I think modelsim_ase/linux/vlm checksums itself, so use FHSUserEnv instead of `patchelf` -in buildFHSUserEnv rec { +in buildFHSEnv rec { name = "quartus-prime-lite"; # wrapped targetPkgs = pkgs: with pkgs; [ diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index c2036566b3844..992d90a772c0e 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -1,7 +1,7 @@ { stdenv, lib, makeDesktopItem , unzip, libsecret, libXScrnSaver, libxshmfence, buildPackages , atomEnv, at-spi2-atk, autoPatchelfHook -, systemd, fontconfig, libdbusmenu, glib, buildFHSUserEnvBubblewrap, wayland +, systemd, fontconfig, libdbusmenu, glib, buildFHSEnvBubblewrap, wayland # Populate passthru.tests , tests @@ -150,9 +150,9 @@ let # in order to create or update extensions. # See: #83288 #91179 #73810 #41189 # - # buildFHSUserEnv allows for users to use the existing vscode + # buildFHSEnv allows for users to use the existing vscode # extension tooling without significant pain. - fhs = { additionalPkgs ? pkgs: [] }: buildFHSUserEnvBubblewrap { + fhs = { additionalPkgs ? pkgs: [] }: buildFHSEnvBubblewrap { # also determines the name of the wrapped command name = executableName; diff --git a/pkgs/applications/graphics/unigine-superposition/default.nix b/pkgs/applications/graphics/unigine-superposition/default.nix index b1261bb52f23f..bc8e128ba44a2 100644 --- a/pkgs/applications/graphics/unigine-superposition/default.nix +++ b/pkgs/applications/graphics/unigine-superposition/default.nix @@ -22,7 +22,7 @@ , mkDerivation , xkeyboard_config , fetchurl -, buildFHSUserEnv +, buildFHSEnv , openal , makeDesktopItem }: @@ -94,9 +94,9 @@ let in # We can patch the "/bin/superposition", but "/bin/launcher" checks it for changes. -# For that we need use a buildFHSUserEnv. +# For that we need use a buildFHSEnv. -buildFHSUserEnv { +buildFHSEnv { name = "Superposition"; targetPkgs = pkgs: [ diff --git a/pkgs/applications/misc/bottles/fhsenv.nix b/pkgs/applications/misc/bottles/fhsenv.nix index 34036894d6e67..da7b73b8245df 100644 --- a/pkgs/applications/misc/bottles/fhsenv.nix +++ b/pkgs/applications/misc/bottles/fhsenv.nix @@ -1,5 +1,5 @@ { lib -, buildFHSUserEnvBubblewrap +, buildFHSEnvBubblewrap , symlinkJoin , bottles-unwrapped , gst_all_1 @@ -99,8 +99,8 @@ in symlinkJoin { name = "bottles"; paths = [ - (buildFHSUserEnvBubblewrap (fhsEnv // { name = "bottles"; runScript = "bottles"; })) - (buildFHSUserEnvBubblewrap (fhsEnv // { name = "bottles-cli"; runScript = "bottles-cli"; })) + (buildFHSEnvBubblewrap (fhsEnv // { name = "bottles"; runScript = "bottles"; })) + (buildFHSEnvBubblewrap (fhsEnv // { name = "bottles-cli"; runScript = "bottles-cli"; })) ]; postBuild = '' mkdir -p $out/share diff --git a/pkgs/applications/misc/houdini/default.nix b/pkgs/applications/misc/houdini/default.nix index b9f78afda4bb3..9c560b7f8313b 100644 --- a/pkgs/applications/misc/houdini/default.nix +++ b/pkgs/applications/misc/houdini/default.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, writeScript, callPackage, buildFHSUserEnv, unwrapped ? callPackage ./runtime.nix {} }: +{ lib, stdenv, writeScript, callPackage, buildFHSEnv, unwrapped ? callPackage ./runtime.nix {} }: -buildFHSUserEnv rec { +buildFHSEnv rec { name = "houdini-${unwrapped.version}"; targetPkgs = pkgs: with pkgs; [ diff --git a/pkgs/applications/misc/lutris/fhsenv.nix b/pkgs/applications/misc/lutris/fhsenv.nix index da1f0a2824b09..59c8be448d140 100644 --- a/pkgs/applications/misc/lutris/fhsenv.nix +++ b/pkgs/applications/misc/lutris/fhsenv.nix @@ -1,4 +1,4 @@ -{ lib, buildFHSUserEnv, lutris-unwrapped +{ lib, buildFHSEnv, lutris-unwrapped , extraPkgs ? pkgs: [ ] , extraLibraries ? pkgs: [ ] , steamSupport ? true @@ -13,7 +13,7 @@ let libXxf86vm libXinerama libSM libXv libXaw libXi libXcursor libXcomposite ]; -in buildFHSUserEnv { +in buildFHSEnv { name = "lutris"; runScript = "lutris"; diff --git a/pkgs/applications/misc/pdfstudio/common.nix b/pkgs/applications/misc/pdfstudio/common.nix index 8d4f7866b8d35..f6ee417869505 100644 --- a/pkgs/applications/misc/pdfstudio/common.nix +++ b/pkgs/applications/misc/pdfstudio/common.nix @@ -5,7 +5,7 @@ , version , desktopName , longDescription -, buildFHSUserEnv +, buildFHSEnv , extraBuildInputs ? [ ] , jdk , stdenv @@ -68,7 +68,7 @@ let in # Package with cups in FHS sandbox, because JAVA bin expects "/usr/bin/lpr" for printing. -buildFHSUserEnv { +buildFHSEnv { name = pname; targetPkgs = pkgs: [ cups diff --git a/pkgs/applications/misc/sidequest/default.nix b/pkgs/applications/misc/sidequest/default.nix index 23684142a09b4..b1c99ab3857eb 100644 --- a/pkgs/applications/misc/sidequest/default.nix +++ b/pkgs/applications/misc/sidequest/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, buildFHSUserEnv, makeDesktopItem, makeWrapper, atomEnv, libuuid, at-spi2-atk, icu, openssl, zlib }: +{ stdenv, lib, fetchurl, buildFHSEnv, makeDesktopItem, makeWrapper, atomEnv, libuuid, at-spi2-atk, icu, openssl, zlib }: let pname = "sidequest"; version = "0.10.24"; @@ -38,7 +38,7 @@ "$out/lib/SideQuest/sidequest" ''; }; - in buildFHSUserEnv { + in buildFHSEnv { name = "SideQuest"; passthru = { diff --git a/pkgs/applications/networking/cisco-packet-tracer/7.nix b/pkgs/applications/networking/cisco-packet-tracer/7.nix index 413ed86619673..b054dcc12c150 100644 --- a/pkgs/applications/networking/cisco-packet-tracer/7.nix +++ b/pkgs/applications/networking/cisco-packet-tracer/7.nix @@ -1,6 +1,6 @@ { stdenv , lib -, buildFHSUserEnvBubblewrap +, buildFHSEnvBubblewrap , copyDesktopItems , dpkg , lndir @@ -40,7 +40,7 @@ let mimeTypes = [ "application/x-pkt" "application/x-pka" "application/x-pkz" ]; }; - fhs = buildFHSUserEnvBubblewrap { + fhs = buildFHSEnvBubblewrap { name = "packettracer7"; runScript = "${ptFiles}/bin/packettracer7"; diff --git a/pkgs/applications/networking/cisco-packet-tracer/8.nix b/pkgs/applications/networking/cisco-packet-tracer/8.nix index 4d4f65c306617..cc69240dd9764 100644 --- a/pkgs/applications/networking/cisco-packet-tracer/8.nix +++ b/pkgs/applications/networking/cisco-packet-tracer/8.nix @@ -2,7 +2,7 @@ , lib , alsa-lib , autoPatchelfHook -, buildFHSUserEnvBubblewrap +, buildFHSEnvBubblewrap , copyDesktopItems , dbus , dpkg @@ -97,7 +97,7 @@ let mimeTypes = [ "application/x-pkt" "application/x-pka" "application/x-pkz" ]; }; - fhs = buildFHSUserEnvBubblewrap { + fhs = buildFHSEnvBubblewrap { name = "packettracer8"; runScript = "${ptFiles}/bin/packettracer"; targetPkgs = pkgs: [ libudev0-shim ]; diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix index a65110b802321..d2924df2ce0c9 100644 --- a/pkgs/applications/networking/dropbox/default.nix +++ b/pkgs/applications/networking/dropbox/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, buildFHSUserEnv, writeScript, makeDesktopItem }: +{ stdenv, lib, buildFHSEnv, writeScript, makeDesktopItem }: let platforms = [ "i686-linux" "x86_64-linux" ]; in @@ -30,7 +30,7 @@ let }; in -buildFHSUserEnv { +buildFHSEnv { name = "dropbox"; targetPkgs = pkgs: with pkgs; with xorg; [ diff --git a/pkgs/applications/networking/expressvpn/default.nix b/pkgs/applications/networking/expressvpn/default.nix index 0bc0fd34fe5ad..fa88705ad2e22 100644 --- a/pkgs/applications/networking/expressvpn/default.nix +++ b/pkgs/applications/networking/expressvpn/default.nix @@ -1,5 +1,5 @@ { autoPatchelfHook -, buildFHSUserEnv +, buildFHSEnv , dpkg , fetchurl , inotify-tools @@ -41,7 +41,7 @@ let ''; }; - expressvpndFHS = buildFHSUserEnv { + expressvpndFHS = buildFHSEnv { name = "expressvpnd"; # When connected, it directly creates/deletes resolv.conf to change the DNS entries. diff --git a/pkgs/applications/networking/pcloud/default.nix b/pkgs/applications/networking/pcloud/default.nix index 2071521266b38..403d1e0cf341a 100644 --- a/pkgs/applications/networking/pcloud/default.nix +++ b/pkgs/applications/networking/pcloud/default.nix @@ -3,7 +3,7 @@ # of applications. # # What Nix does, simplifying a bit, is that it extracts an AppImage and starts -# it via buildFHSUserEnv - this is totally fine for majority of apps, but makes +# it via buildFHSEnv - this is totally fine for majority of apps, but makes # it by-design *impossible* to launch SUID wrappers [^1]; in case of pCloud, # it's fusermount. # (so pCloud starts, but silently fails to mount the FUSE drive.) diff --git a/pkgs/applications/networking/remote/vmware-horizon-client/default.nix b/pkgs/applications/networking/remote/vmware-horizon-client/default.nix index 3841c4af45398..a6cd01390b715 100644 --- a/pkgs/applications/networking/remote/vmware-horizon-client/default.nix +++ b/pkgs/applications/networking/remote/vmware-horizon-client/default.nix @@ -1,6 +1,6 @@ { stdenv , lib -, buildFHSUserEnv +, buildFHSEnv , fetchurl , gsettings-desktop-schemas , makeDesktopItem @@ -57,7 +57,7 @@ let ''; }; - vmwareFHSUserEnv = name: buildFHSUserEnv { + vmwareFHSUserEnv = name: buildFHSEnv { inherit name; runScript = "${vmwareHorizonClientFiles}/bin/${name}_wrapper"; diff --git a/pkgs/applications/science/electronics/bitscope/common.nix b/pkgs/applications/science/electronics/bitscope/common.nix index 1cd23d0f414d7..6a024748daf28 100644 --- a/pkgs/applications/science/electronics/bitscope/common.nix +++ b/pkgs/applications/science/electronics/bitscope/common.nix @@ -1,5 +1,5 @@ { atk -, buildFHSUserEnv +, buildFHSEnv , cairo , dpkg , gdk-pixbuf @@ -56,7 +56,7 @@ let ${(wrapBinary libs) attrs.toolName} ''; }); -in buildFHSUserEnv { +in buildFHSEnv { name = "${attrs.toolName}-${attrs.version}"; runScript = "${pkg.outPath}/bin/${attrs.toolName}"; } // { inherit (pkg) meta name; } diff --git a/pkgs/applications/science/misc/foldingathome/client.nix b/pkgs/applications/science/misc/foldingathome/client.nix index 47a86fa2aeaf1..c927df9a54916 100644 --- a/pkgs/applications/science/misc/foldingathome/client.nix +++ b/pkgs/applications/science/misc/foldingathome/client.nix @@ -1,6 +1,6 @@ { lib, stdenv , autoPatchelfHook -, buildFHSUserEnv +, buildFHSEnv , dpkg , fetchurl , gcc-unwrapped @@ -35,7 +35,7 @@ let installPhase = "cp -ar usr $out"; }; in -buildFHSUserEnv { +buildFHSEnv { name = fahclient.name; targetPkgs = pkgs': [ diff --git a/pkgs/applications/video/davinci-resolve/default.nix b/pkgs/applications/video/davinci-resolve/default.nix index c519d5254c3c5..0b7cec3477391 100644 --- a/pkgs/applications/video/davinci-resolve/default.nix +++ b/pkgs/applications/video/davinci-resolve/default.nix @@ -8,7 +8,7 @@ , addOpenGLRunpath , libGLU , xorg -, buildFHSUserEnv +, buildFHSEnv , bash , writeText , ocl-icd @@ -133,7 +133,7 @@ let } ); in -buildFHSUserEnv { +buildFHSEnv { name = "davinci-resolve"; targetPkgs = pkgs: with pkgs; [ librsvg diff --git a/pkgs/applications/video/lightworks/default.nix b/pkgs/applications/video/lightworks/default.nix index b01af67cd68e6..fab7d8a443522 100644 --- a/pkgs/applications/video/lightworks/default.nix +++ b/pkgs/applications/video/lightworks/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, dpkg, makeWrapper, buildFHSUserEnv +{ lib, stdenv, fetchurl, dpkg, makeWrapper, buildFHSEnv , gtk3, gdk-pixbuf, cairo, libjpeg_original, glib, pango, libGLU , libGL, nvidia_cg_toolkit, zlib, openssl, libuuid , alsa-lib, udev, libjack2 }: @@ -73,7 +73,7 @@ let }; # Lightworks expects some files in /usr/share/lightworks -in buildFHSUserEnv { +in buildFHSEnv { name = lightworks.name; targetPkgs = pkgs: [ diff --git a/pkgs/applications/video/webtorrent_desktop/default.nix b/pkgs/applications/video/webtorrent_desktop/default.nix index 8f1353fa83e48..591089af41559 100644 --- a/pkgs/applications/video/webtorrent_desktop/default.nix +++ b/pkgs/applications/video/webtorrent_desktop/default.nix @@ -2,7 +2,7 @@ ## - export ELECTRON_SKIP_BINARY_DOWNLOAD=1 ## - jq "del(.scripts.preinstall)" node_modules/shellcheck/package.json | sponge node_modules/shellcheck/package.json { - lib, stdenv, buildFHSUserEnvBubblewrap, runCommand, writeScript, fetchurl, fetchzip + lib, stdenv, buildFHSEnvBubblewrap, runCommand, writeScript, fetchurl, fetchzip }: let pname = "webtorrent-desktop"; @@ -20,7 +20,7 @@ runCommand "${pname}-${version}" rec { else throw "Webtorrent is not currently supported on ${stdenv.hostPlatform.system}"; - fhs = buildFHSUserEnvBubblewrap rec { + fhs = buildFHSEnvBubblewrap rec { name = "fhsEnterWebTorrent"; runScript = "${src}/WebTorrent"; ## use the trampoline, if you need to shell into the fhsenv diff --git a/pkgs/applications/virtualization/vmware-workstation/default.nix b/pkgs/applications/virtualization/vmware-workstation/default.nix index 035fc9ceb2d00..f15bc9163480f 100755 --- a/pkgs/applications/virtualization/vmware-workstation/default.nix +++ b/pkgs/applications/virtualization/vmware-workstation/default.nix @@ -1,5 +1,5 @@ { stdenv -, buildFHSUserEnv +, buildFHSEnv , fetchurl , lib , zlib @@ -64,7 +64,7 @@ let ''; }); - vmware-unpack-env = buildFHSUserEnv rec { + vmware-unpack-env = buildFHSEnv rec { name = "vmware-unpack-env"; targetPkgs = pkgs: [ zlib ]; }; diff --git a/pkgs/build-support/appimage/default.nix b/pkgs/build-support/appimage/default.nix index bcda40c800faa..0637964ca62fb 100644 --- a/pkgs/build-support/appimage/default.nix +++ b/pkgs/build-support/appimage/default.nix @@ -6,7 +6,7 @@ , libarchive , pv , squashfsTools -, buildFHSUserEnv +, buildFHSEnv , pkgs }: @@ -43,7 +43,7 @@ rec { extraPkgs, meta ? {}, ... - }: buildFHSUserEnv + }: buildFHSEnv (defaultFhsEnvArgs // { inherit name; diff --git a/pkgs/build-support/build-fhs-userenv-bubblewrap/buildFHSEnv.nix b/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix index 78da74c82849f..78da74c82849f 100644 --- a/pkgs/build-support/build-fhs-userenv-bubblewrap/buildFHSEnv.nix +++ b/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix diff --git a/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix b/pkgs/build-support/build-fhsenv-bubblewrap/default.nix index 5d94c309fe080..5d94c309fe080 100644 --- a/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix +++ b/pkgs/build-support/build-fhsenv-bubblewrap/default.nix diff --git a/pkgs/build-support/build-fhs-userenv/chrootenv/default.nix b/pkgs/build-support/build-fhsenv-chroot/chrootenv/default.nix index 32ac43d415563..32ac43d415563 100644 --- a/pkgs/build-support/build-fhs-userenv/chrootenv/default.nix +++ b/pkgs/build-support/build-fhsenv-chroot/chrootenv/default.nix diff --git a/pkgs/build-support/build-fhs-userenv/chrootenv/src/chrootenv.c b/pkgs/build-support/build-fhsenv-chroot/chrootenv/src/chrootenv.c index c109d7297e174..c109d7297e174 100644 --- a/pkgs/build-support/build-fhs-userenv/chrootenv/src/chrootenv.c +++ b/pkgs/build-support/build-fhsenv-chroot/chrootenv/src/chrootenv.c diff --git a/pkgs/build-support/build-fhs-userenv/chrootenv/src/meson.build b/pkgs/build-support/build-fhsenv-chroot/chrootenv/src/meson.build index 6d0770a0dc4ac..6d0770a0dc4ac 100644 --- a/pkgs/build-support/build-fhs-userenv/chrootenv/src/meson.build +++ b/pkgs/build-support/build-fhsenv-chroot/chrootenv/src/meson.build diff --git a/pkgs/build-support/build-fhs-userenv/default.nix b/pkgs/build-support/build-fhsenv-chroot/default.nix index 6f0adfb4e08cb..6f0adfb4e08cb 100644 --- a/pkgs/build-support/build-fhs-userenv/default.nix +++ b/pkgs/build-support/build-fhsenv-chroot/default.nix diff --git a/pkgs/build-support/build-fhs-userenv/env.nix b/pkgs/build-support/build-fhsenv-chroot/env.nix index fbc50c2dc2533..fbc50c2dc2533 100644 --- a/pkgs/build-support/build-fhs-userenv/env.nix +++ b/pkgs/build-support/build-fhsenv-chroot/env.nix diff --git a/pkgs/development/compilers/flutter/flutter.nix b/pkgs/development/compilers/flutter/flutter.nix index 531107ddd448d..f755d3118afcd 100644 --- a/pkgs/development/compilers/flutter/flutter.nix +++ b/pkgs/development/compilers/flutter/flutter.nix @@ -6,7 +6,7 @@ }: { bash -, buildFHSUserEnv +, buildFHSEnv , cacert , git , runCommand @@ -100,7 +100,7 @@ let # Wrap flutter inside an fhs user env to allow execution of binary, # like adb from $ANDROID_HOME or java from android-studio. - fhsEnv = buildFHSUserEnv { + fhsEnv = buildFHSEnv { name = "${drvName}-fhs-env"; multiPkgs = pkgs: [ # Flutter only use these certificates diff --git a/pkgs/development/embedded/arduino/arduino-cli/default.nix b/pkgs/development/embedded/arduino/arduino-cli/default.nix index a23bf5d433bbd..68e4b7413a303 100644 --- a/pkgs/development/embedded/arduino/arduino-cli/default.nix +++ b/pkgs/development/embedded/arduino/arduino-cli/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, buildGoModule, fetchFromGitHub, buildFHSUserEnv, installShellFiles }: +{ lib, stdenv, buildGoModule, fetchFromGitHub, buildFHSEnv, installShellFiles }: let @@ -48,10 +48,10 @@ let in if stdenv.isLinux then -# buildFHSUserEnv is needed because the arduino-cli downloads compiler +# buildFHSEnv is needed because the arduino-cli downloads compiler # toolchains from the internet that have their interpreters pointed at # /lib64/ld-linux-x86-64.so.2 - buildFHSUserEnv + buildFHSEnv { inherit (pkg) name meta; diff --git a/pkgs/development/embedded/arduino/arduino-core/chrootenv.nix b/pkgs/development/embedded/arduino/arduino-core/chrootenv.nix index 4c13b2493a9a4..1313a9aeada39 100644 --- a/pkgs/development/embedded/arduino/arduino-core/chrootenv.nix +++ b/pkgs/development/embedded/arduino/arduino-core/chrootenv.nix @@ -1,8 +1,8 @@ -{ lib, buildFHSUserEnv, arduino-core-unwrapped, withGui ? false, withTeensyduino ? false }: +{ lib, buildFHSEnv, arduino-core-unwrapped, withGui ? false, withTeensyduino ? false }: let arduino-unwrapped = arduino-core-unwrapped.override { inherit withGui withTeensyduino; }; in -buildFHSUserEnv { +buildFHSEnv { name = "arduino"; targetPkgs = diff --git a/pkgs/development/embedded/platformio/chrootenv.nix b/pkgs/development/embedded/platformio/chrootenv.nix index dd3da78250a2b..55adb0edaa750 100644 --- a/pkgs/development/embedded/platformio/chrootenv.nix +++ b/pkgs/development/embedded/platformio/chrootenv.nix @@ -1,4 +1,4 @@ -{ lib, buildFHSUserEnv, platformio-core }: +{ lib, buildFHSEnv, platformio-core }: let pio-pkgs = pkgs: @@ -19,7 +19,7 @@ let ]); in -buildFHSUserEnv { +buildFHSEnv { name = "platformio"; targetPkgs = pio-pkgs; diff --git a/pkgs/development/interpreters/nextflow/default.nix b/pkgs/development/interpreters/nextflow/default.nix index 1d3d1070fc719..e4885f985abaa 100644 --- a/pkgs/development/interpreters/nextflow/default.nix +++ b/pkgs/development/interpreters/nextflow/default.nix @@ -8,7 +8,7 @@ , gnused , gawk , coreutils -, buildFHSUserEnv +, buildFHSEnv }: let @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { }; in if stdenv.isLinux then - buildFHSUserEnv + buildFHSEnv { name = "nextflow"; targetPkgs = pkgs: [ nextflow ]; diff --git a/pkgs/development/python-modules/mlflow/default.nix b/pkgs/development/python-modules/mlflow/default.nix index c165f80ac30ff..dd36a07bd1e65 100644 --- a/pkgs/development/python-modules/mlflow/default.nix +++ b/pkgs/development/python-modules/mlflow/default.nix @@ -94,7 +94,7 @@ buildPythonPackage rec { # no tests in PyPI dist # run into https://stackoverflow.com/questions/51203641/attributeerror-module-alembic-context-has-no-attribute-config - # also, tests use conda so can't run on NixOS without buildFHSUserEnv + # also, tests use conda so can't run on NixOS without buildFHSEnv doCheck = false; meta = with lib; { diff --git a/pkgs/development/tools/electron-fiddle/default.nix b/pkgs/development/tools/electron-fiddle/default.nix index fe4108840c504..f0ce8ce76860f 100644 --- a/pkgs/development/tools/electron-fiddle/default.nix +++ b/pkgs/development/tools/electron-fiddle/default.nix @@ -1,4 +1,4 @@ -{ buildFHSUserEnv +{ buildFHSEnv , electron_22 , fetchFromGitHub , fetchYarnDeps @@ -86,7 +86,7 @@ let }; in -buildFHSUserEnv { +buildFHSEnv { name = "electron-fiddle"; runScript = "${electron}/bin/electron ${unwrapped}/lib/electron-fiddle/resources/app.asar"; diff --git a/pkgs/development/tools/hover/default.nix b/pkgs/development/tools/hover/default.nix index f42bd44c50e20..ec302001ff637 100644 --- a/pkgs/development/tools/hover/default.nix +++ b/pkgs/development/tools/hover/default.nix @@ -1,6 +1,6 @@ { lib , buildGoModule -, buildFHSUserEnv +, buildFHSEnv , binutils , dejavu_fonts , pkg-config @@ -84,7 +84,7 @@ let }; in -buildFHSUserEnv rec { +buildFHSEnv rec { name = pname; targetPkgs = pkgs: [ binutils diff --git a/pkgs/development/tools/unityhub/default.nix b/pkgs/development/tools/unityhub/default.nix index cc56aea7df426..af67ba03bcd49 100644 --- a/pkgs/development/tools/unityhub/default.nix +++ b/pkgs/development/tools/unityhub/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, dpkg, makeWrapper, buildFHSUserEnv +{ lib, stdenv, fetchurl, dpkg, makeWrapper, buildFHSEnv , extraPkgs ? pkgs: [ ] , extraLibs ? pkgs: [ ] }: @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { makeWrapper ]; - fhsEnv = buildFHSUserEnv { + fhsEnv = buildFHSEnv { name = "${pname}-fhs-env"; runScript = ""; diff --git a/pkgs/games/anki/bin.nix b/pkgs/games/anki/bin.nix index 39b10bcb15c1c..7a7da42081d4a 100644 --- a/pkgs/games/anki/bin.nix +++ b/pkgs/games/anki/bin.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, lib, buildFHSUserEnv, appimageTools, writeShellScript, anki, undmg, zstd, commandLineArgs ? [] }: +{ fetchurl, stdenv, lib, buildFHSEnv, appimageTools, writeShellScript, anki, undmg, zstd, commandLineArgs ? [] }: let pname = "anki-bin"; @@ -50,7 +50,7 @@ let passthru = { inherit sources; }; - fhsUserEnvAnki = buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // { + fhsEnvAnki = buildFHSEnv (appimageTools.defaultFhsEnvArgs // { inherit pname version; name = null; # Appimage sets it to "appimage-env" @@ -75,7 +75,7 @@ let }); in -if stdenv.isLinux then fhsUserEnvAnki +if stdenv.isLinux then fhsEnvAnki else stdenv.mkDerivation { inherit pname version passthru; diff --git a/pkgs/games/clonehero/fhs-wrapper.nix b/pkgs/games/clonehero/fhs-wrapper.nix index cd7f3986b1090..83e9788c39ba7 100644 --- a/pkgs/games/clonehero/fhs-wrapper.nix +++ b/pkgs/games/clonehero/fhs-wrapper.nix @@ -1,6 +1,6 @@ { clonehero-unwrapped , makeDesktopItem -, buildFHSUserEnv +, buildFHSEnv , liberation_ttf , callPackage }: @@ -16,7 +16,7 @@ let categories = [ "Game" ]; }; in -buildFHSUserEnv { +buildFHSEnv { inherit name; inherit (clonehero-unwrapped) meta; diff --git a/pkgs/games/heroic/fhsenv.nix b/pkgs/games/heroic/fhsenv.nix index 172e1aeafacb6..ecdbe749e3960 100644 --- a/pkgs/games/heroic/fhsenv.nix +++ b/pkgs/games/heroic/fhsenv.nix @@ -1,11 +1,11 @@ { lib -, buildFHSUserEnv +, buildFHSEnv , heroic-unwrapped , extraPkgs ? pkgs: [ ] , extraLibraries ? pkgs: [ ] }: -buildFHSUserEnv { +buildFHSEnv { name = "heroic"; runScript = "heroic"; diff --git a/pkgs/games/left4gore/default.nix b/pkgs/games/left4gore/default.nix index 597f7da2b3d20..c203d03ab13e8 100644 --- a/pkgs/games/left4gore/default.nix +++ b/pkgs/games/left4gore/default.nix @@ -1,4 +1,4 @@ -{ stdenvNoCC, lib, fetchurl, buildFHSUserEnv }: +{ stdenvNoCC, lib, fetchurl, buildFHSEnv }: let version = "2.3"; @@ -20,7 +20,7 @@ let }; # FHS env, as patchelf will not work - env = buildFHSUserEnv { + env = buildFHSEnv { name = "left4gore-env-${version}"; targetPkgs = _: [ left4gore-unwrapped ]; runScript = "left4gore"; diff --git a/pkgs/games/runescape-launcher/default.nix b/pkgs/games/runescape-launcher/default.nix index 6fbe73a6bedfb..062a194c83dcc 100644 --- a/pkgs/games/runescape-launcher/default.nix +++ b/pkgs/games/runescape-launcher/default.nix @@ -1,7 +1,7 @@ { stdenv , lib , autoPatchelfHook -, buildFHSUserEnv +, buildFHSEnv , cairo , dpkg , fetchurl @@ -109,10 +109,10 @@ in /* * We can patch the runescape launcher, but it downloads a client at runtime and checks it for changes. - * For that we need use a buildFHSUserEnv. + * For that we need use a buildFHSEnv. * FHS simulates a classic linux shell */ - buildFHSUserEnv { + buildFHSEnv { name = "RuneScape"; targetPkgs = pkgs: [ runescape diff --git a/pkgs/games/shticker-book-unwritten/default.nix b/pkgs/games/shticker-book-unwritten/default.nix index aa02087a75aad..f19fe258f70b9 100644 --- a/pkgs/games/shticker-book-unwritten/default.nix +++ b/pkgs/games/shticker-book-unwritten/default.nix @@ -1,9 +1,9 @@ -{ buildFHSUserEnv, callPackage, lib }: +{ buildFHSEnv, callPackage, lib }: let shticker-book-unwritten-unwrapped = callPackage ./unwrapped.nix { }; -in buildFHSUserEnv { +in buildFHSEnv { name = "shticker_book_unwritten"; targetPkgs = pkgs: with pkgs; [ alsa-lib diff --git a/pkgs/games/steam/default.nix b/pkgs/games/steam/default.nix index 9e7b815661c9e..538a66dcfd74e 100644 --- a/pkgs/games/steam/default.nix +++ b/pkgs/games/steam/default.nix @@ -1,5 +1,5 @@ { makeScopeWithSplicing, generateSplicesForMkScope -, stdenv, buildFHSUserEnv, pkgsi686Linux +, stdenv, buildFHSEnv, pkgsi686Linux }: let @@ -19,7 +19,7 @@ let if self.steamArch == "amd64" then pkgsi686Linux.steamPackages.steam-runtime-wrapped else null; - inherit buildFHSUserEnv; + inherit buildFHSEnv; }; steam-fhsenv-small = steam-fhsenv.override { withGameSpecificLibraries = false; }; steamcmd = callPackage ./steamcmd.nix { }; diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index 8d461104eaacd..4476b0c23c96a 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, writeShellScript, buildFHSUserEnv, steam, glxinfo-i686 +{ lib, stdenv, writeShellScript, buildFHSEnv, steam, glxinfo-i686 , steam-runtime-wrapped, steam-runtime-wrapped-i686 ? null , extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs , extraLibraries ? pkgs: [ ] # extra packages to add to multiPkgs @@ -55,7 +55,7 @@ let envScript = lib.toShellVars extraEnv; -in buildFHSUserEnv rec { +in buildFHSEnv rec { name = "steam"; targetPkgs = pkgs: with pkgs; [ @@ -270,7 +270,7 @@ in buildFHSUserEnv rec { # breaks the ability for application to reference shared memory. unsharePid = false; - passthru.run = buildFHSUserEnv { + passthru.run = buildFHSEnv { name = "steam-run"; targetPkgs = commonTargetPkgs; diff --git a/pkgs/games/unvanquished/default.nix b/pkgs/games/unvanquished/default.nix index 98b8917f6e2b0..a8ad86e11a9ca 100644 --- a/pkgs/games/unvanquished/default.nix +++ b/pkgs/games/unvanquished/default.nix @@ -4,7 +4,7 @@ , fetchFromGitHub , fetchpatch , SDL2 -, buildFHSUserEnv +, buildFHSEnv , cmake , copyDesktopItems , curl @@ -95,7 +95,7 @@ let ''; }; - fhsEnv = buildFHSUserEnv { + fhsEnv = buildFHSEnv { name = "unvanquished-fhs-wrapper"; targetPkgs = pkgs: [ libstdcpp-preload-for-unvanquished-nacl ]; diff --git a/pkgs/servers/onlyoffice-documentserver/default.nix b/pkgs/servers/onlyoffice-documentserver/default.nix index 2c30cb0e18e77..6bcba5f1ac38e 100644 --- a/pkgs/servers/onlyoffice-documentserver/default.nix +++ b/pkgs/servers/onlyoffice-documentserver/default.nix @@ -1,6 +1,6 @@ { lib , stdenv -, buildFHSUserEnvBubblewrap +, buildFHSEnvBubblewrap , corefonts , dejavu_fonts , dpkg @@ -57,7 +57,7 @@ let dontStrip = true; passthru = { - fhs = buildFHSUserEnvBubblewrap { + fhs = buildFHSEnvBubblewrap { name = "onlyoffice-wrapper"; targetPkgs = pkgs: [ diff --git a/pkgs/servers/plex/default.nix b/pkgs/servers/plex/default.nix index b989959b62556..b3400d9f522c6 100644 --- a/pkgs/servers/plex/default.nix +++ b/pkgs/servers/plex/default.nix @@ -1,6 +1,6 @@ # The actual Plex package that we run is a FHS userenv of the "raw" package. { stdenv -, buildFHSUserEnvBubblewrap +, buildFHSEnvBubblewrap , writeScript , plexRaw @@ -9,7 +9,7 @@ , dataDir ? "/var/lib/plex" }: -buildFHSUserEnvBubblewrap { +buildFHSEnvBubblewrap { name = "plexmediaserver"; inherit (plexRaw) meta; diff --git a/pkgs/tools/networking/burpsuite/default.nix b/pkgs/tools/networking/burpsuite/default.nix index 72591f74d87df..765391db2c5de 100644 --- a/pkgs/tools/networking/burpsuite/default.nix +++ b/pkgs/tools/networking/burpsuite/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, jdk, buildFHSUserEnv, unzip, makeDesktopItem }: +{ lib, fetchurl, jdk, buildFHSEnv, unzip, makeDesktopItem }: let version = "2023.2.4"; @@ -23,7 +23,7 @@ let }; in -buildFHSUserEnv { +buildFHSEnv { inherit name; runScript = "${jdk}/bin/java -jar ${src}"; diff --git a/pkgs/tools/package-management/appimage-run/default.nix b/pkgs/tools/package-management/appimage-run/default.nix index 0595f2ea99f88..286fd9d7ff68b 100644 --- a/pkgs/tools/package-management/appimage-run/default.nix +++ b/pkgs/tools/package-management/appimage-run/default.nix @@ -1,4 +1,4 @@ -{ appimageTools, buildFHSUserEnv, makeDesktopItem, extraPkgs ? pkgs: [], appimage-run-tests ? null }: +{ appimageTools, buildFHSEnv, makeDesktopItem, extraPkgs ? pkgs: [], appimage-run-tests ? null }: let name = "appimage-run"; @@ -14,7 +14,7 @@ let mimeTypes = ["application/vnd.appimage" "application/x-iso9660-appimage"]; categories = ["PackageManager" "Utility"]; }; -in buildFHSUserEnv (fhsArgs // { +in buildFHSEnv (fhsArgs // { inherit name; targetPkgs = pkgs: [ appimageTools.appimage-exec ] diff --git a/pkgs/tools/package-management/conda/default.nix b/pkgs/tools/package-management/conda/default.nix index ff655ac6e9b37..b20165a078616 100644 --- a/pkgs/tools/package-management/conda/default.nix +++ b/pkgs/tools/package-management/conda/default.nix @@ -3,7 +3,7 @@ , fetchurl , runCommand , makeWrapper -, buildFHSUserEnv +, buildFHSEnv , libselinux , libarchive , libGL @@ -63,7 +63,7 @@ let --prefix "LD_LIBRARY_PATH" : "${libPath}" ''); in - buildFHSUserEnv { + buildFHSEnv { name = "conda-shell"; targetPkgs = pkgs: (builtins.concatLists [ [ conda ] condaDeps extraPkgs]); profile = '' diff --git a/pkgs/tools/security/beyond-identity/default.nix b/pkgs/tools/security/beyond-identity/default.nix index eec53d3bf97be..46ed84078c2d9 100644 --- a/pkgs/tools/security/beyond-identity/default.nix +++ b/pkgs/tools/security/beyond-identity/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, dpkg, buildFHSUserEnv +{ lib, stdenv, fetchurl, dpkg, buildFHSEnv , glibc, glib, openssl, tpm2-tss , gtk3, gnome, polkit, polkit_gnome }: @@ -70,7 +70,7 @@ let ''; }; # /usr/bin/pkcheck is hardcoded in binary - we need FHS -in buildFHSUserEnv { +in buildFHSEnv { inherit meta; name = pname; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index b10d82bd3978b..60bf6c83186c3 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -163,6 +163,10 @@ mapAliases ({ bud = throw "bud has been removed: abandoned by upstream"; # Added 2022-03-14 inherit (libsForQt5.mauiPackages) buho; # added 2022-05-17 buttersink = throw "buttersink has been removed: abandoned by upstream"; # Added 2022-04-05 + # Shorter names; keep the longer name for back-compat. Added 2023-04-11 + buildFHSUserEnv = buildFHSEnv; + buildFHSUserEnvChroot = buildFHSEnvChroot; + buildFHSUserEnvBubblewrap = buildFHSEnvBubblewrap; # bitwarden_rs renamed to vaultwarden with release 1.21.0 (2021-04-30) bitwarden_rs = vaultwarden; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 50b6dec7aa1b4..b3d7b372eb8d9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -371,9 +371,9 @@ with pkgs; buildEnv = callPackage ../build-support/buildenv { }; # not actually a package - buildFHSUserEnv = buildFHSUserEnvBubblewrap; - buildFHSUserEnvChroot = callPackage ../build-support/build-fhs-userenv { }; - buildFHSUserEnvBubblewrap = callPackage ../build-support/build-fhs-userenv-bubblewrap { }; + buildFHSEnv = buildFHSEnvBubblewrap; + buildFHSEnvChroot = callPackage ../build-support/build-fhsenv-chroot { }; + buildFHSEnvBubblewrap = callPackage ../build-support/build-fhsenv-bubblewrap { }; buildMaven = callPackage ../build-support/build-maven.nix { }; @@ -16445,7 +16445,7 @@ with pkgs; zulip = callPackage ../applications/networking/instant-messengers/zulip { # Bubblewrap breaks zulip, see https://github.com/NixOS/nixpkgs/pull/97264#issuecomment-704454645 appimageTools = pkgs.appimageTools.override { - buildFHSUserEnv = pkgs.buildFHSUserEnv; + buildFHSEnv = pkgs.buildFHSEnvChroot; }; }; |