Skip to content

Commit

Permalink
Add hasVersion to python plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sestrella committed Nov 14, 2023
1 parent 9b9b700 commit 23360bb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/python/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
inputs.nixpkgs-python.url = "github:cachix/nixpkgs-python";

outputs = { self, nixpkgs-python }: {
lib.packageFromVersion = { system ? builtins.currentSystem, version }:
nixpkgs-python.packages.${system}.${version};
lib = {
hasVersion = { version, system ? builtins.currentSystem }:
builtins.hasAttr version nixpkgs-python.packages.${system};
packageFromVersion = { version, system ? builtins.currentSystem }:
nixpkgs-python.packages.${system}.${version};
};
};
}

0 comments on commit 23360bb

Please sign in to comment.