Skip to content

Commit abdbb46

Browse files
committed
fix: Use version from pyproject.toml
1 parent f51836b commit abdbb46

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

flake.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
{
99
# Nixpkgs overlay providing the application
1010
overlay = nixpkgs.lib.composeManyExtensions [
11-
(final: prev: {
11+
(final: prev: let
12+
pyprojectFile = builtins.fromTOML (builtins.readFile ./pyproject.toml);
13+
in {
1214
# The application
13-
cosmo = final.callPackage ./package.nix {};
15+
cosmo = final.callPackage ./package.nix { version = pyprojectFile.tool.poetry.version; };
1416
})
1517
];
1618
} // (flake-utils.lib.eachDefaultSystem (system:

package.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
{ python3Packages, ... }:
1+
{ python3Packages, version, ... }:
22

33
python3Packages.buildPythonApplication rec {
4+
inherit version;
5+
46
pname = "cosmo";
5-
version = "0.10.1";
67
pyproject = true;
78

89
src = ./.;

0 commit comments

Comments
 (0)