mirror of
https://github.com/slavfox/Cozette.git
synced 2026-03-11 08:54:33 +00:00
Sync version with SFD file
The version was 1.28.0, but the actual version in the SFD file is 1.30.0. This change aligns the Nix package version with the source.
This commit is contained in:
parent
8c6ab0e2d5
commit
1675cc8a0f
1 changed files with 15 additions and 2 deletions
17
flake.nix
17
flake.nix
|
|
@ -14,6 +14,7 @@
|
|||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
inherit (pkgs) lib;
|
||||
in
|
||||
{
|
||||
devShells = {
|
||||
|
|
@ -33,7 +34,19 @@
|
|||
# Derivation to build and install cozette
|
||||
cozette = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "cozette";
|
||||
version = "1.28.0";
|
||||
version =
|
||||
let
|
||||
sfdLines = lib.strings.splitString "\n" (builtins.readFile ./Cozette/Cozette.sfd);
|
||||
sfdVersionLine = lib.lists.findFirst (l: lib.strings.hasPrefix "Version: " l) null sfdLines;
|
||||
sfdVersion =
|
||||
if sfdVersionLine != null then lib.strings.removePrefix "Version: " sfdVersionLine else "0.00";
|
||||
majorRest = lib.strings.splitString "." sfdVersion;
|
||||
major = builtins.elemAt majorRest 0;
|
||||
minorPatch = builtins.elemAt majorRest 1;
|
||||
minor = builtins.substring 0 2 minorPatch;
|
||||
patch = builtins.substring 2 1 minorPatch;
|
||||
in
|
||||
"${major}.${minor}.${patch}";
|
||||
|
||||
src = ./.;
|
||||
|
||||
|
|
@ -55,7 +68,7 @@
|
|||
|
||||
postPatch = ''
|
||||
substituteInPlace build.py --replace-fail \
|
||||
'bitsnpicas.sh' '${pkgs.lib.getExe pkgs.bitsnpicas}'
|
||||
'bitsnpicas.sh' '${lib.getExe pkgs.bitsnpicas}'
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
|
|
|
|||
Loading…
Reference in a new issue