Skip to content

Commit d3ffd0a

Browse files
committed
Update Nix flake
1 parent 6e5e926 commit d3ffd0a

File tree

4 files changed

+35
-25
lines changed

4 files changed

+35
-25
lines changed

.github/workflows/build.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
with:
11-
# Nix Flakes doesn't work on shallow clones
12-
fetch-depth: 0
13-
- uses: cachix/install-nix-action@v12
14-
with:
15-
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-3.0pre20201007_5257a25/install
16-
extra_nix_config: |
17-
experimental-features = nix-command flakes
9+
- uses: actions/checkout@v4
10+
- uses: cachix/install-nix-action@v31
1811
- run: nix build

default.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
{ lib, fetchFromGitHub, buildPythonApplication, requests, pyyaml, netifaces
2-
, beautifulsoup4, black, flake8 }:
1+
{ lib, fetchFromGitHub, buildPythonApplication, setuptools, requests, pyyaml
2+
, netifaces, beautifulsoup4, black, flake8 }:
33

44
buildPythonApplication {
55
pname = "dnsupdate";
66
version = "0.4";
7+
pyproject = true;
78

89
src = ./.;
910

11+
nativeBuildInputs = [ setuptools ];
12+
1013
propagatedBuildInputs = [ requests pyyaml netifaces beautifulsoup4 ];
1114

1215
checkInputs = [ black flake8 ];
@@ -22,5 +25,6 @@ buildPythonApplication {
2225
license = licenses.gpl3;
2326
maintainers = with maintainers; [ lopsided98 ];
2427
platforms = platforms.all;
28+
mainProgram = "dnsupdate";
2529
};
2630
}

flake.lock

Lines changed: 24 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@
1010
eachSystem allSystems (system: let
1111
pkgs = nixpkgs.legacyPackages.${system};
1212
in {
13-
defaultPackage = pkgs.python3Packages.callPackage ./. { };
13+
packages.default = pkgs.python3Packages.callPackage ./. { };
1414

15-
defaultApp = {
16-
type = "app";
17-
program = "${self.defaultPackage.${system}}/bin/dnsupdate";
18-
};
19-
20-
devShell = self.defaultPackage.${system};
15+
devShells.default = self.packages.${system}.default;
2116
}) //
2217
eachSystem [ "x86_64-linux" ] (system: {
23-
hydraJobs.build = self.defaultPackage.${system};
18+
hydraJobs.build = self.packages.${system}.default;
2419
});
2520
}

0 commit comments

Comments
 (0)