Unverified Commit 3431290a authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

buildNpmPackage: support finalAttrs through lib.extendMkDerivation (#390099)

parents d005c8a1 43bf9e32
Loading
Loading
Loading
Loading
+95 −92
Original line number Diff line number Diff line
@@ -7,6 +7,11 @@
  cctools,
}@topLevelArgs:

lib.extendMkDerivation {
  constructDrv = stdenv.mkDerivation;

  extendDrvArgs =
    finalAttrs:
    {
      name ? "${args.pname}-${args.version}",
      src ? null,
@@ -77,9 +82,7 @@ let
        inherit nodejs;
      };
    in
stdenv.mkDerivation (
  args
  // {
    {
      inherit npmDeps npmBuildScript;

      nativeBuildInputs =
@@ -103,5 +106,5 @@ stdenv.mkDerivation (
      meta = (args.meta or { }) // {
        platforms = args.meta.platforms or nodejs.meta.platforms;
      };
    };
}
)
+4 −4
Original line number Diff line number Diff line
@@ -20,14 +20,14 @@
  nix-update-script,
}:

buildNpmPackage rec {
buildNpmPackage (finalAttrs: {
  pname = "ags";
  version = "1.8.2";

  src = fetchFromGitHub {
    owner = "Aylur";
    repo = "ags";
    rev = "v${version}";
    rev = "v${finalAttrs.version}";
    hash = "sha256-ebnkUaee/pnfmw1KmOZj+MP1g5wA+8BT/TPKmn4Dkwc=";
    fetchSubmodules = true;
  };
@@ -68,7 +68,7 @@ buildNpmPackage rec {
  meta = {
    homepage = "https://github.com/Aylur/ags";
    description = "EWW-inspired widget system as a GJS library";
    changelog = "https://github.com/Aylur/ags/releases/tag/v${version}";
    changelog = "https://github.com/Aylur/ags/releases/tag/v${finalAttrs.version}";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [
      foo-dogsquared
@@ -77,4 +77,4 @@ buildNpmPackage rec {
    mainProgram = "ags";
    platforms = lib.platforms.linux;
  };
}
})