mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-08 20:19:04 +03:00
versioning (WIP)
This commit is contained in:
@@ -13,6 +13,13 @@
|
|||||||
];
|
];
|
||||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
||||||
|
|
||||||
|
baseVersion = "0.1.4";
|
||||||
|
|
||||||
|
semver =
|
||||||
|
if self ? rev
|
||||||
|
then "${baseVersion}+${toString self.revCount}.git.${builtins.substring 0 7 self.rev}"
|
||||||
|
else "${baseVersion}+dev"; # Accept that local builds show "+dev"
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = forAllSystems (
|
packages = forAllSystems (
|
||||||
@@ -21,7 +28,7 @@
|
|||||||
pkgs = nixpkgsFor.${system};
|
pkgs = nixpkgsFor.${system};
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
clrsync = pkgs.callPackage ./package.nix { };
|
clrsync = pkgs.callPackage ./package.nix { inherit semver; };
|
||||||
default = clrsync;
|
default = clrsync;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -16,18 +16,13 @@
|
|||||||
zlib,
|
zlib,
|
||||||
bzip2,
|
bzip2,
|
||||||
wayland-scanner,
|
wayland-scanner,
|
||||||
|
semver
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "clrsync";
|
pname = "clrsync";
|
||||||
|
|
||||||
baseVersion = "0.1.4";
|
version = semver;
|
||||||
|
|
||||||
version =
|
|
||||||
if src ? rev then
|
|
||||||
"${baseVersion}+${toString src.revCount}.git.${lib.substring 0 7 src.rev}"
|
|
||||||
else
|
|
||||||
baseVersion;
|
|
||||||
|
|
||||||
src = lib.cleanSourceWith {
|
src = lib.cleanSourceWith {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
namespace clrsync::core
|
namespace clrsync::core
|
||||||
{
|
{
|
||||||
|
|
||||||
const std::string GIT_SEMVER = "0.1.4+3.git.g8a2b224";
|
const std::string GIT_SEMVER = "0.1.4+4.git.ga5d6503";
|
||||||
|
|
||||||
const std::string version_string();
|
const std::string version_string();
|
||||||
} // namespace clrsync::core
|
} // namespace clrsync::core
|
||||||
|
|||||||
Reference in New Issue
Block a user