flake: use self as src

This commit is contained in:
Jörg Thalheim 2020-12-01 10:31:29 +01:00
parent 65b6abb927
commit fb4ec8bce0
No known key found for this signature in database
GPG Key ID: 003F2096411B5F92
2 changed files with 7 additions and 3 deletions

View File

@ -1,10 +1,12 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> {},
src ? ./.
}:
with pkgs;
python3.pkgs.buildPythonApplication rec {
name = "nix-update";
src = ./.;
inherit src;
buildInputs = [ makeWrapper ];
checkInputs = [
python3.pkgs.pytest

View File

@ -5,7 +5,9 @@
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem flake-utils.lib.allSystems (system: {
packages.nix-update = nixpkgs.legacyPackages.${system}.callPackage ./. {};
packages.nix-update = nixpkgs.legacyPackages.${system}.callPackage self {
src = self;
};
defaultPackage = self.packages.${system}.nix-update;
});
}