main: more detailed --version output
This commit is contained in:
@@ -105,20 +105,27 @@
|
||||
default = self.packages.${system}.worblehat;
|
||||
worblehat = let
|
||||
inherit (pkgs) python3Packages;
|
||||
inherit (self) sourceInfo;
|
||||
pyproject = lib.pipe ./pyproject.toml [
|
||||
builtins.readFile
|
||||
builtins.fromTOML
|
||||
];
|
||||
in python3Packages.buildPythonApplication {
|
||||
pname = pyproject.project.name;
|
||||
version = pyproject.project.version;
|
||||
version = "0.1";
|
||||
src = lib.cleanSource ./.;
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
build-system = with python3Packages; [ hatchling ];
|
||||
build-system = with python3Packages; [ setuptools setuptools-scm ];
|
||||
dependencies = deps pkgs.python3Packages;
|
||||
|
||||
env.SETUPTOOLS_SCM_PRETEND_METADATA = (x: "{${x}}") (lib.concatStringsSep ", " [
|
||||
"node=\"${sourceInfo.rev or (lib.substring 0 64 sourceInfo.dirtyRev)}\""
|
||||
"node_date=${lib.substring 0 4 sourceInfo.lastModifiedDate}-${lib.substring 4 2 sourceInfo.lastModifiedDate}-${lib.substring 6 2 sourceInfo.lastModifiedDate}"
|
||||
"dirty=${if sourceInfo ? dirtyRev then "true" else "false"}"
|
||||
]);
|
||||
|
||||
meta.mainProgram = "worblehat";
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user