diff options
author | Alan Hollis <me@alanhollis.com> | 2020-01-17 22:25:35 +0000 |
---|---|---|
committer | Michael Weiss <dev.primeos@gmail.com> | 2020-01-17 23:25:35 +0100 |
commit | 4f4d792e709aefa6df56f70d8baad330abed32ca (patch) | |
tree | 2569fe8a151ba549a76b5a9b2782cc0744b3b4b0 /pkgs/applications/networking/gns3/default.nix | |
parent | ee3458392b5a82e46f6aaa29cd150e9955b7fc92 (diff) |
gns3: Fix python package not being pinned (#77701)
Due to https://github.com/NixOS/nixpkgs/issues/44426 the correct psutils
package is not picked up, this commit changes the code so the correct
version is always picked.
Diffstat (limited to 'pkgs/applications/networking/gns3/default.nix')
-rw-r--r-- | pkgs/applications/networking/gns3/default.nix | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix index 71044bd0f181..2dae8377055f 100644 --- a/pkgs/applications/networking/gns3/default.nix +++ b/pkgs/applications/networking/gns3/default.nix @@ -7,8 +7,19 @@ let let version = if args.stable then stableVersion else previewVersion; branch = if args.stable then "stable" else "preview"; in args // { inherit version branch; }; - mkGui = args: callPackage (import ./gui.nix (addVersion args)) { }; - mkServer = args: callPackage (import ./server.nix (addVersion args)) { }; + extraArgs = { + mkOverride = attrname: version: sha256: + self: super: { + ${attrname} = super.${attrname}.overridePythonAttrs (oldAttrs: { + inherit version; + src = oldAttrs.src.override { + inherit version sha256; + }; + }); + }; + }; + mkGui = args: callPackage (import ./gui.nix (addVersion args // extraArgs)) { }; + mkServer = args: callPackage (import ./server.nix (addVersion args // extraArgs)) { }; guiSrcHash = "1yxwbz93x9hn5y6dir8v7bdfsmfgppvjg4z88l8gx82hhf2476fx"; serverSrcHash = "1d3m8qrz82g8ii6q6j015wqwp6j0415fbqbjvw43zhdx5mnn962d"; in { |