!kjdutkOsheZdjqYmqp:nixos.org

Nixpkgs / NixOS contributions

1890 Members
NixOS 24.05 Uakari | #review-requests:nixos.org | https://nixos.org/blog/announcements.html#nixos-23.11 | https://hydra.nixos.org/jobset/nixos/trunk-combined | https://reproducible.nixos.org/ | 24.05 RMs: wegank & Mic92418 Servers

Load older messages


SenderMessageTime
21 Oct 2024
@reecertv:matrix.orgReecerTV set a profile picture.18:59:17
@artur:glasgow.social(artur 'manuel) changed their display name from (lambda (f l) (format nil "~a ~a")) "Artur" "Manuel" to (artur 'manuel).20:04:36
@maka_77x:matrix.orgmaka_77x joined the room.20:05:37
22 Oct 2024
@xyven:matrix.org@xyven:matrix.org left the room.02:02:02
@reckenrode:matrix.orgRandy Eckenrode
In reply to @matthewcroughan:defenestrate.it

Trying to update a package, but finding this

rcodesign> error[E0282]: type annotations needed for `Box<_>`
rcodesign>   --> /build/rcodesign-0.27.0-vendor.tar.gz/time/src/format_description/parse/mod.rs:83:9
rcodesign>    |
rcodesign> 83 |     let items = format_items
rcodesign>    |         ^^^^^
rcodesign> ...
rcodesign> 86 |     Ok(items.into())
rcodesign>    |              ---- type must be known at this point
rcodesign>    |
rcodesign>    = note: this is an inference error on crate `time` caused by an API change in Rust 1.80.0; update `time` to version `>=0.3.35` by calling `cargo update`
fyi https://github.com/NixOS/nixpkgs/pull/350374
03:07:57
@human:nitro.chathuman joined the room.04:49:17
@zarel_it:matrix.org@zarel_it:matrix.org left the room.09:31:33
@raf:notashelf.devraf Is the formatting check failing for nixos/tests/all-tests.nix my fault, or can it be overlooked? Formatting it with nixfmt-rfc-style *really* messes up the structure, so I don't think it's expected to be formatted via nixfmt? 09:32:35
@raf:notashelf.devraf Nvm, it was caused a formatting mistake in the test. 09:38:05
@rnhmjoj:eurofusion.eurnhmjoj joined the room.10:37:25
@niko:nrab.lolniko ⚡️

(Cross-posting from nix discord, figured I’d get a response here faster)

One would think that localSystem and crossSystem overlap horribly with the three *Platforms (buildPlatform, hostPlatform, and targetPlatform; see stage.nix or the manual). Actually, those identifiers are purposefully not used here to draw a subtle but important distinction: While the granularity of having 3 platforms is necessary to properly build packages, it is overkill for specifying the user’s intent when making a build plan or package set.

Okay, but what if that „overkill” is what I want and what I need? Can I manually specify all the 3 platforms? Does our cross infra consider that possibility?

11:36:16
@k900:0upti.meK900Why do you want that? 11:37:39
@k900:0upti.meK900Are you trying to do some sort of Canadian cross setup?11:38:49
@niko:nrab.lolniko ⚡️
In reply to @k900:0upti.me
Are you trying to do some sort of Canadian cross setup?
I’d want to build binutils for build = x86_64-linux-gnu, host = x86_64-linux-musl, target = arm-none-eabi. (Not actually binutils specifically in this case, but close enough) and while this isn’t as bad since I can just say musl is my build, imagine host was arm-linux-musl. Would that mean I have to compile binutils on the arm host?
11:41:45
@k900:0upti.meK900Canadian cross is generally not well supported by, um, anything 11:42:28
@k900:0upti.meK900 But also targetPlatform is kind of a weird implementation detail and ideally we just wouldn't have it at all 11:43:10
@k900:0upti.meK900But it has to exist because the GNU toolchain is silly 11:43:26
@niko:nrab.lolniko ⚡️ So generally one has to assume either build=host or host=target 11:43:55
@k900:0upti.meK900 Ideally the correct way to represent this would be targetPlatform == null 11:44:45
@k900:0upti.meK900 But currently we have targetPlatform == hostPlatform for most packages even though they don't actually care 11:45:27
@niko:nrab.lolniko ⚡️So assuming the ideal world where target = null, something like arm-none-eabi-gcc compiled for x86_64-linux-gnu loses the arm-none-eabi information and it’s not relevant for the cross infra, is that right?11:46:50
@k900:0upti.meK900 No, the packages that do still have one specific target will still have targetPlatform 11:47:48
@k900:0upti.meK900 But something like, I don't know, Qt doesn't have anything that could reasonably be called a targetPlatform 11:48:19
@niko:nrab.lolniko ⚡️ Ah, okay, that’s what you meant, sorry 11:48:20
@niko:nrab.lolniko ⚡️ changed their profile picture.11:49:17
@aktaboot:tchncs.deaktaboot changed their profile picture.12:11:12
@rnhmjoj:maxwell.ydns.eu@rnhmjoj:maxwell.ydns.eu left the room.12:40:06
@ihar.hrachyshka:matrix.orgIhar Hrachyshka

Confused why the shell file name expansion doesn't work here:

diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index d2a52f187eb9..58e4c07e7320 100644
--- a/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/pkgs/applications/networking/browsers/firefox/common.nix
@@ -164,16 +164,6 @@ assert pipewireSupport -> !waylandSupport || !webrtcSupport -> throw "${pname}:
 let
   inherit (lib) enableFeature;
 
-  mutFirstChar =
-    f: s:
-    let
-      firstChar = f (lib.substring 0 1 s);
-      rest = lib.substring 1 (-1) s;
-    in
-    firstChar + rest;
-  toTitle = s: mutFirstChar lib.toUpper s;
-  darwinAppName = toTitle binaryName + ".app";
-
   # Target the LLVM version that rustc is built with for LTO.
   llvmPackages0 = rustc.llvmPackages;
   llvmPackagesBuildBuild0 = pkgsBuildBuild.rustc.llvmPackages;
@@ -575,9 +565,9 @@ buildStdenv.mkDerivation {
 
   postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
     mkdir -p $out/Applications
-    cp -r dist/${binaryName}/${darwinAppName} $out/Applications
+    cp -r dist/${binaryName}/*.app $out/Applications
 
-    resourceDir=$out/Applications/${darwinAppName}/Contents/Resources
+    resourceDir=$out/Applications/*.app/Contents/Resources
 
   '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
     # Remove SDK cruft. FIXME: move to a separate output?
@@ -602,7 +592,7 @@ buildStdenv.mkDerivation {
   # Some basic testing
   doInstallCheck = true;
   installCheckPhase = lib.optionalString buildStdenv.hostPlatform.isDarwin ''
-    bindir=$out/Applications/${darwinAppName}/Contents/MacOS
+    bindir=$out/Applications/*.app/Contents/MacOS
   '' + lib.optionalString (!buildStdenv.hostPlatform.isDarwin) ''
     bindir=$out/bin
   '' + ''

This fails as follows:

> make[1]: Leaving directory '/private/tmp/nix-build-firefox-devedition-unwrapped-132.0b5.drv-1/firefox-132.0/objdir/browser/installer'
       > install: missing destination file operand after '/nix/store/80bzwch9jalvbpw3xgm3642hfz18hbbx-distribution.ini'
       > Try 'install --help' for more information.

Interesting that the file expansion in cp works; but not in resourceDir= variable declaration.

13:52:37
@ihar.hrachyshka:matrix.orgIhar Hrachyshka *

Confused why the shell file name expansion doesn't work here:

diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index d2a52f187eb9..58e4c07e7320 100644
--- a/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/pkgs/applications/networking/browsers/firefox/common.nix
@@ -164,16 +164,6 @@ assert pipewireSupport -> !waylandSupport || !webrtcSupport -> throw "${pname}:
 let
   inherit (lib) enableFeature;
 
-  mutFirstChar =
-    f: s:
-    let
-      firstChar = f (lib.substring 0 1 s);
-      rest = lib.substring 1 (-1) s;
-    in
-    firstChar + rest;
-  toTitle = s: mutFirstChar lib.toUpper s;
-  darwinAppName = toTitle binaryName + ".app";
-
   # Target the LLVM version that rustc is built with for LTO.
   llvmPackages0 = rustc.llvmPackages;
   llvmPackagesBuildBuild0 = pkgsBuildBuild.rustc.llvmPackages;
@@ -575,9 +565,9 @@ buildStdenv.mkDerivation {
 
   postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
     mkdir -p $out/Applications
-    cp -r dist/${binaryName}/${darwinAppName} $out/Applications
+    cp -r dist/${binaryName}/*.app $out/Applications
 
-    resourceDir=$out/Applications/${darwinAppName}/Contents/Resources
+    resourceDir=$out/Applications/*.app/Contents/Resources
 
   '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
     # Remove SDK cruft. FIXME: move to a separate output?
@@ -602,7 +592,7 @@ buildStdenv.mkDerivation {
   # Some basic testing
   doInstallCheck = true;
   installCheckPhase = lib.optionalString buildStdenv.hostPlatform.isDarwin ''
-    bindir=$out/Applications/${darwinAppName}/Contents/MacOS
+    bindir=$out/Applications/*.app/Contents/MacOS
   '' + lib.optionalString (!buildStdenv.hostPlatform.isDarwin) ''
     bindir=$out/bin
   '' + ''

This fails as follows:

> make[1]: Leaving directory '/private/tmp/nix-build-firefox-devedition-unwrapped-132.0b5.drv-1/firefox-132.0/objdir/browser/installer'
       > install: missing destination file operand after '/nix/store/80bzwch9jalvbpw3xgm3642hfz18hbbx-distribution.ini'
       > Try 'install --help' for more information.

Interesting that the file expansion in cp works; but not in resourceDir= variable declaration.

13:52:51
@ihar.hrachyshka:matrix.orgIhar Hrachyshka (The command that fails is install -Dvm644 ${distributionIni} $resourceDir/distribution/distribution.ini) 13:54:25

Show newer messages


Back to Room ListRoom Version: 6