Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-update pulumiPackages.pulumi-azure-native fails #201

Open
teto opened this issue Oct 11, 2023 · 1 comment
Open

nix-update pulumiPackages.pulumi-azure-native fails #201

teto opened this issue Oct 11, 2023 · 1 comment

Comments

@teto
Copy link
Contributor

teto commented Oct 11, 2023

would be nice to have this work

PROMPT> nix-update pulumiPackages.pulumi-azure-native                      
$ nix eval --json --impure --expr 
let
  
  pkgs = import "/home/teto/nixpkgs";
  args =  builtins.functionArgs pkgs;
  inputs = (if args ? system then { system = builtins.currentSystem; } else {}) //
           (if args ? overlays then { overlays = [ ]; } else {});
  pkg = (pkgs inputs)."pulumiPackages"."pulumi-azure-native";
  sanitizePosition = x: x;

  raw_version_position = sanitizePosition (builtins.unsafeGetAttrPos "version" pkg);

  position = if pkg ? isRubyGem then
    raw_version_position
  else if pkg ? isPhpExtension then
    raw_version_position
   else
    sanitizePosition (builtins.unsafeGetAttrPos "src" pkg);
in {
  name = pkg.name;
  old_version = pkg.version or (builtins.parseDrvName pkg.name).version;
  inherit raw_version_position;
  filename = position.file;
  line = position.line;
  urls = pkg.src.urls or null;
  url = pkg.src.url or null;
  rev = pkg.src.rev or null;
  hash = pkg.src.outputHash or null;
  go_modules = pkg.goModules.outputHash or null;
  go_modules_old = pkg.go-modules.outputHash or null;
  cargo_deps = pkg.cargoDeps.outputHash or null;
  raw_cargo_lock =
    if pkg ? cargoDeps.lockFile then
      let
        inherit (pkg.cargoDeps) lockFile;
        res = builtins.tryEval (sanitizePosition {
          file = toString lockFile;
        });
      in
      if res.success then res.value.file else false
    else
      null;
  npm_deps = pkg.npmDeps.outputHash or null;
  yarn_deps = pkg.offlineCache.outputHash or null;
  tests = builtins.attrNames (pkg.passthru.tests or {});
  has_update_script = pkg.passthru.updateScript or null != null;
  src_homepage = pkg.src.meta.homepage or null;
  changelog = pkg.meta.changelog or null;
} --extra-experimental-features flakes nix-command
fetch https://github.com/pulumi/pulumi-azure-native/releases.atom
Update 1.92.0 -> 2.11.0 in /home/teto/nixpkgs/pkgs/tools/admin/pulumi-packages/base.nix
$ nix-build --expr let src = (import "/home/teto/nixpkgs" (if (builtins.hasAttr "config" (builtins.functionArgs (import "/home/teto/nixpkgs"))) then { config.checkMeta = false; overlays = []; } else { }))."pulumiPackages"."pulumi-azure-native".src; in (src.overrideAttrs or (f: src // f src)) (_: { outputHash = ""; outputHashAlgo = "sha256"; }) --extra-experimental-features flakes nix-command
$ nix-build --expr let src = (import "/home/teto/nixpkgs" (if (builtins.hasAttr "config" (builtins.functionArgs (import "/home/teto/nixpkgs"))) then { config.checkMeta = false; overlays = []; } else { }))."pulumiPackages"."pulumi-azure-native".goModules; in (src.overrideAttrs or (f: src // f src)) (_: { outputHash = ""; outputHashAlgo = "sha256"; }) --extra-experimental-features flakes nix-command

seems like it's getting a wrong position and is thus trying the wrong file.

Regardless of the feature, the nix-update process seemed stuck, like not ending but with no visible progress either

@Mic92
Copy link
Owner

Mic92 commented Oct 11, 2023

You can use --override-filename to specify a different filename used for patching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants