devbox
devbox copied to clipboard
Warning: Failed to upgrade ../ReadRealTimeWriteCSV/ using `nix profile upgrade`: ../ReadRealTimeWriteCSV/: package not found
What happened?
Using Devbox 0.10.7 and the command upgrade now produces this new warning on WSL2
Steps to reproduce
- Have custom flake being built as:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nuget-packageslock2nix = {
url = "github:mdarocha/nuget-packageslock2nix/main";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, nuget-packageslock2nix, ... }: {
packages.x86_64-linux.default =
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
dotnet-sdk = pkgs.dotnetCorePackages.sdk_8_0;
dotnet-aspnetcore = pkgs.dotnetCorePackages.aspnetcore_8_0;
dotnet-runtime = pkgs.dotnetCorePackages.runtime_8_0;
in
pkgs.buildDotnetModule {
dotnet-runtime = dotnet-runtime;
dotnet-sdk = dotnet-sdk;
dotnet-aspnetcore = dotnet-aspnetcore;
pname = "ReadRealTimeWriteCSV";
version = "0.0.1";
src = ./ReadRealTimeWriteCSV;
nugetDeps = nuget-packageslock2nix.lib {
system = "x86_64-linux";
name = "ReadRealTimeWriteCSV";
lockfiles = [
./ReadRealTimeWriteCSV/packages.lock.json
];
};
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
devShells.x86_64-linux.default = let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
pkgs.mkShell {
buildInputs = with pkgs; [
dotnet-sdk_8
];
};
};
}
- Added flake using
devbox add path:../ReadRealTimeWriteCSV devbox updatereports the new warning
Command
No response
devbox.json
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.6/.schema/devbox.schema.json",
"packages": [
"../ReadCSVWriteRealTime/",
"path",
"../WriteInputCSV/",
"../ReadRealTimeWriteCSV/",
"dos2unix@latest"
],
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}
### Devbox version
0.10.7
### Nix version
nix (Nix) 2.17.1
### What system does this bug occur on?
Other (please include in the description above)
### Debug logs
_No response_
Is the devbox.json in this formatted correctly? It should be something like
"packages": [
"path:../ReadCSVWriteRealTime/",
"path:../WriteInputCSV/",
"path:../ReadRealTimeWriteCSV/",
"dos2unix@latest"
],
The error message is saying that it can't find that package, most likely because ../ReadCSVWriteRealTime/ is not a valid Flake reference. Formatting it as above should fix the package not found error
I agree the devbox.json isn't correct. I'm not in the habit of editing the file by hand, but did it this time to match your example:
"packages": [
"path:../ReadCSVWriteRealTime/",
"path:../WriteInputCSV/",
"path:../ReadRealTimeWriteCSV/",
"dos2unix@latest"
],
I still have the issue:
Info: Attempting to upgrade path:../ReadCSVWriteRealTime/ using `nix profile upgrade`
Warning: Failed to upgrade path:../ReadCSVWriteRealTime/ using `nix profile upgrade`: path:../ReadCSVWriteRealTime/: package not found
Info: Attempting to upgrade path:../WriteInputCSV/ using `nix profile upgrade`
Warning: Failed to upgrade path:../WriteInputCSV/ using `nix profile upgrade`: path:../WriteInputCSV/: package not found
Info: Attempting to upgrade path:../ReadRealTimeWriteCSV/ using `nix profile upgrade`
Warning: Failed to upgrade path:../ReadRealTimeWriteCSV/ using `nix profile upgrade`: path:../ReadRealTimeWriteCSV/: package not found
Info: Already up-to-date dos2unix@latest 7.5.2
Info: Installing the following packages to the nix store: path:../ReadCSVWriteRealTime/, path:../WriteInputCSV/, path:../ReadRealTimeWriteCSV/, dos2unix@latest
Info: Running "nix flake update"
$ ls ../ReadCSVWriteRealTime/flake*
../ReadCSVWriteRealTime/flake.lock ../ReadCSVWriteRealTime/flake.nix
$ ls ../WriteInputCSV/flake*
../WriteInputCSV/flake.lock ../WriteInputCSV/flake.nix
$ ls ../ReadRealTimeWriteCSV/flake*
../ReadRealTimeWriteCSV/flake.lock ../ReadRealTimeWriteCSV/flake.nix ../ReadRealTimeWriteCSV/flake.nix~
josephwinston@LT-0061:~/work/StasisDrilling/FieldTrials/Tests/Exercise$
the good news is that everything works