mirror of
https://github.com/snowfallorg/nix-software-center.git
synced 2024-09-11 21:27:09 +03:00
Fix some legacy version checking
This commit is contained in:
parent
de7f090e0d
commit
4f168a95b5
@ -325,20 +325,7 @@ fn setupprofilepkgscache() -> Result<(), Box<dyn Error>> {
|
||||
// nix-instantiate --eval -E '(builtins.getFlake "/home/victor/nix").inputs.nixpkgs.outPath'
|
||||
// nix-env -f /nix/store/sjmq1gphj1arbzf4aqqnygd9pf4hkfkf-source -qa --json > packages.json
|
||||
fn setupupdatecache() -> Result<(), Box<dyn Error>> {
|
||||
let vout = Command::new("nix-instantiate")
|
||||
.arg("-I")
|
||||
.arg("nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos")
|
||||
.arg("<nixpkgs/lib>")
|
||||
.arg("-A")
|
||||
.arg("version")
|
||||
.arg("--eval")
|
||||
.arg("--json")
|
||||
.output()?;
|
||||
|
||||
let dlver = String::from_utf8_lossy(&vout.stdout)
|
||||
.to_string()
|
||||
.replace('"', "");
|
||||
// let dlver = fs::read_to_string("/run/current-system/nixos-version")?;
|
||||
let dlver = fs::read_to_string("/run/current-system/nixos-version")?;
|
||||
|
||||
let mut relver = dlver.split('.').collect::<Vec<&str>>().join(".")[0..5].to_string();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user