Skip to content

Commit

Permalink
packaging: Pass version directly
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Jul 6, 2024
1 parent efd5f50 commit 0729f0a
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 60 deletions.
1 change: 1 addition & 0 deletions packaging/dependencies.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ let
in
scope: {
inherit stdenv versionSuffix;
version = lib.fileContents ../.version + versionSuffix;

libseccomp = pkgs.libseccomp.overrideAttrs (_: rec {
version = "2.5.5";
Expand Down
4 changes: 2 additions & 2 deletions src/external-api-docs/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
Expand All @@ -16,7 +16,7 @@ in

mkMesonDerivation (finalAttrs: {
pname = "nix-external-api-docs";
version = lib.fileContents ./.version + versionSuffix;
inherit version;

workDir = ./.;
fileset =
Expand Down
4 changes: 2 additions & 2 deletions src/internal-api-docs/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
Expand All @@ -16,7 +16,7 @@ in

mkMesonDerivation (finalAttrs: {
pname = "nix-internal-api-docs";
version = lib.fileContents ./.version + versionSuffix;
inherit version;

workDir = ./.;
fileset = let
Expand Down
4 changes: 1 addition & 3 deletions src/libcmd/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# Configuration Options

, versionSuffix ? ""
, version

# Whether to enable Markdown rendering in the Nix binary.
, enableMarkdown ? !stdenv.hostPlatform.isWindows
Expand All @@ -36,8 +36,6 @@

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions src/libexpr-c/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions src/libexpr/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# Configuration Options

, versionSuffix ? ""
, version

# Whether to use garbage collection for the Nix language evaluator.
#
Expand All @@ -36,8 +36,6 @@

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions src/libfetchers/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions src/libflake/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions src/libmain/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions src/libstore-c/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions src/libstore/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@

# Configuration Options

, versionSuffix ? ""
, version

, embeddedSandboxShell ? stdenv.hostPlatform.isStatic
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions src/libutil-c/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions src/libutil/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 2 additions & 2 deletions src/perl/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
, pkg-config
, nix-store
, darwin
, versionSuffix ? ""
, version
, curl
, bzip2
, libsodium
Expand All @@ -20,7 +20,7 @@ in

perl.pkgs.toPerlModule (mkMesonDerivation (finalAttrs: {
pname = "nix-perl";
version = lib.fileContents ./.version + versionSuffix;
inherit version;

workDir = ./.;
fileset = fileset.unions ([
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/libexpr-support/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/libexpr/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/libfetchers/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/libflake/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/libstore-support/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/libstore/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/libutil-support/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/libutil/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@

# Configuration Options

, versionSuffix ? ""
, version
}:

let
inherit (lib) fileset;

version = lib.fileContents ./.version + versionSuffix;
in

mkMesonDerivation (finalAttrs: {
Expand Down

0 comments on commit 0729f0a

Please sign in to comment.