In a nix dev shell I’m trying to directly override a package version, in the hope that it will simply build the needed derivation using a new ${version}
value:
{ pkgs ? import <nixpkgs> {} }:
let
stdLibPath = pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc ];
in
pkgs.mkShell {
buildInputs = with pkgs; [
clang go_1_17 cmake which git git-lfs ping
stdenv.cc.cc.lib
dbus.dev at-spi2-core.dev
gtk3 libdatrie libepoxy.dev libxml2 zlib-ng
libselinux libsepol
libthai libxkbcommon xorg.libXdmcp xorg.libXtst
ninja pcre pkg-config
util-linux.dev wget appimagekit appimage-run
] ++ (with import (builtins.fetchTarball
"https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") { config = { allowUnfree = true;}; }; [
dart
(flutter.overrideAttrs ( oldAttr: rec { version = "3.0.0"; }))
]);
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.libepoxy}/lib:${stdLibPath}
export SSH_AUTH_SOCK=/run/user/$UID/keyring/ssh
export GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
'';
}
In this case, flutter
unstable is at 2.10.x
and the derivation has version
in it’s argument list, which appears to be used (as per convention) to determine which version needs to be built. I’m trying to simply build 3.0.0
by overriding version
, anticipating it would behave the same as in an overlay (and if the derivation would need more tweaks I’d add them step by step).
It appears however, that the override is simply ignored and I get a shell with the default flutter version.