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:
Kenichi Kamiya 2025-12-20 02:10:41 +09:00
parent 8c6ab0e2d5
commit 1675cc8a0f
No known key found for this signature in database
GPG key ID: 9BE4016A38165CCB

View file

@ -14,6 +14,7 @@
system: system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
inherit (pkgs) lib;
in in
{ {
devShells = { devShells = {
@ -33,7 +34,19 @@
# Derivation to build and install cozette # Derivation to build and install cozette
cozette = pkgs.stdenvNoCC.mkDerivation { cozette = pkgs.stdenvNoCC.mkDerivation {
pname = "cozette"; 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 = ./.; src = ./.;
@ -55,7 +68,7 @@
postPatch = '' postPatch = ''
substituteInPlace build.py --replace-fail \ substituteInPlace build.py --replace-fail \
'bitsnpicas.sh' '${pkgs.lib.getExe pkgs.bitsnpicas}' 'bitsnpicas.sh' '${lib.getExe pkgs.bitsnpicas}'
''; '';
buildPhase = '' buildPhase = ''