aws-azure-login: Link Puppeteer to Chromium#272592
Merged
imincik merged 2 commits intoNixOS:masterfrom Jan 15, 2024
Merged
Conversation
8621a75 to
7bbe9d9
Compare
dotlambda
reviewed
Dec 7, 2023
45e4f32 to
a756bf8
Compare
yurrriq
reviewed
Dec 11, 2023
imincik
requested changes
Jan 15, 2024
Contributor
There was a problem hiding this comment.
Thanks for fixing the package. Fix looks good to me but I'll made some comments and requested few changes. After that, I am good to merge this PR.
Here is the example of using finalAttrs function plus some other changes I requested:
diff --git a/pkgs/by-name/aw/aws-azure-login/package.nix b/pkgs/by-name/aw/aws-azure-login/package.nix
index e6eaa7fde372..164be566ee2f 100644
--- a/pkgs/by-name/aw/aws-azure-login/package.nix
+++ b/pkgs/by-name/aw/aws-azure-login/package.nix
@@ -1,28 +1,28 @@
{ lib
+, runCommand
, stdenv
-, callPackage
+
, chromium
, fetchFromGitHub
, fetchYarnDeps
, makeWrapper
, nodejs
-, pkgs
, prefetch-yarn-deps
, yarn
}:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
pname = "aws-azure-login";
version = "3.6.1";
src = fetchFromGitHub {
owner = "aws-azure-login";
repo = "aws-azure-login";
- rev = "v${version}";
+ rev = "v${finalAttrs.version}";
hash = "sha256-PvPnqaKD98h3dCjEOwF+Uc86xCJzn2b9XNHHn13h/2Y=";
};
offlineCache = fetchYarnDeps {
- yarnLock = "${src}/yarn.lock";
+ yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-SXQPRzF6b1FJl5HkyXNm3kGoNSDXux+0RYXBX93mOts=";
};
@@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
'';
passthru.tests.aws-azure-login =
- pkgs.runCommand "${pname}-tests"
+ runCommand "${finalAttrs.pname}-tests"
{
HOME = "/tmp/home";
} ''
@@ -84,7 +84,7 @@ stdenv.mkDerivation rec {
azure_default_remember_me=false
EOF
- ! ${lib.getExe pkgs.aws-azure-login} --profile=my-profile 2> stderr
+ ! ${lib.getExe finalAttrs.finalPackage} --profile=my-profile 2> stderr
[[ "$(cat stderr)" == 'Unable to recognize page state! A screenshot has been dumped to aws-azure-login-unrecognized-state.png. If this problem persists, try running with --mode=gui or --mode=debug' ]]
touch $out
@@ -98,4 +98,4 @@ stdenv.mkDerivation rec {
maintainers = with lib.maintainers; [ l0b0 ];
platforms = lib.platforms.all;
};
-}
+})The original maintainer no longer uses this software <NixOS#272544 (comment)>.
Closes NixOS#272544. The test verifies that the command fails for the *right* reason, rather than the original issue: > Error: Could not find expected browser (chrome) locally. Run `npm > install` to download the correct Chromium revision (982053).
a756bf8 to
44896b1
Compare
Contributor
|
Result of 1 package built:
|
imincik
approved these changes
Jan 15, 2024
1 task
Contributor
|
Successfully created backport PR for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Closes #272544, avoiding the following runtime error:
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.