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

Git+https #94

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Git+https #94

wants to merge 12 commits into from

Conversation

Sohalt
Copy link
Contributor

@Sohalt Sohalt commented Aug 13, 2021

This should fix #89
There should probably be a test for this.

@Sohalt Sohalt force-pushed the git+https branch 2 times, most recently from 0e22900 to 9d88dd2 Compare August 13, 2021 15:39
@andir
Copy link
Collaborator

andir commented Aug 13, 2021

Does this supersede #93?

@Sohalt
Copy link
Contributor Author

Sohalt commented Aug 13, 2021

Does this supersede #93?

No, this is orthogonal to #93

@Sohalt
Copy link
Contributor Author

Sohalt commented Aug 13, 2021

Though I just noticed, I messed up while untangling the commits and there's some stuff in here, that should be in #93

@andir
Copy link
Collaborator

andir commented Aug 14, 2021

Though I just noticed, I messed up while untangling the commits and there's some stuff in here, that should be in #93

Can you untangle these changes?

@Sohalt
Copy link
Contributor Author

Sohalt commented Aug 14, 2021

Can you untangle these changes?

Yes, I'll try to do that tonight. I'm currently on a train.

internal.nix Outdated Show resolved Hide resolved
danielphan2003 added a commit to danielphan2003/flk that referenced this pull request Sep 10, 2021
flake: update lock file
gh: dont enforce check flake, remove try-check, keep going after failure
{home,nixos}: revamp with attrValues
{play,games}/minecraft: moved to games/
sway:
 - add flameshot
 - revamp ss procedure
 - dbus detect bus address
 - rofi -> nwg-drawer
 - lock: also lock tty, use doas
 winapps: use tailscale ip & address
 xdg: move libvirt to hdd
 lib: refactor getPatches
nixos: dont test system
themachine: remove nmap overlay
lightcord: wip
{spotify,spicetify}: update latest, use ziro theme
wine: add bottles pkg
minecraft: only available via tailscale
core: add ouch pkg, refactor old sudo aliases
zsh: df -> duf, add disks alias
android: remove anbox
chrony: init persistence, laptop -> core, replaces timesyncd
networkd: remove dhcp option in public config
virt/windows: init, add scream-ivshmem
electron:
 - remove ignore-gpu-blocklist
 - separate waylandOptions from flags
 - ungoogled-chromium use waylandOptions
 - wip wayland for spotify
overlays:
 - use latest duf, flameshot, nwg*, ouch, scream
 - waylandPkgs use latest wlroots-eglstreams, build rofi-wayland
 - wine: properly pass flake check, originate from https://github.com/cidkidnix/nixcfg
treewide:
 - remove rec usage excluding {home,nixos}/default.nix
 - hasSuffix -> baseNameOf
npmlock2nix: init with patch from nix-community/npmlock2nix#94
sources: update, add vs code ext headwind
spotify-spicetified:
 - spotifyLaunchFlags -> commandLineArgs
 - add extraConfig
ntfs2btrfs: add lzo and zstd support
Copy link
Collaborator

@andir andir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good but I made a few suggestions that should be easy enough.

internal.nix Outdated Show resolved Hide resolved
internal.nix Outdated Show resolved Hide resolved
internal.nix Outdated Show resolved Hide resolved
internal.nix Outdated Show resolved Hide resolved
internal.nix Outdated Show resolved Hide resolved
internal.nix Show resolved Hide resolved
internal.nix Outdated Show resolved Hide resolved
@Sohalt
Copy link
Contributor Author

Sohalt commented Oct 8, 2021

@andir is there anything still missing for this?

@ursi
Copy link

ursi commented Oct 19, 2021

I tried to use this but got this error

error: [npmlock2nix] parseGitRef expects a string that matches `git\+(https://[^#]+)#(.+)` but was called with `git+https://github.com/ethereumjs/ethereumjs-abi.git`

looks like it's because you're requiring a #.

edit: well I patched the urls manually with mapAttrsRecursive and came to find out that this doesn't support github:org/repo without a revision. So I guess that makes sense.

@dermetfan
Copy link

dermetfan commented Nov 13, 2022

Quick snippet for anyone running into the parseGitRef error due to unlocked git dependencies in package.json:

node_modules_attrs = let
  transformJsonFile = file: f:
    lib.pipe file [
      lib.importJSON
      f
      builtins.toJSON
      (pkgs.writeText (baseNameOf file))
      (d: d.outPath)
    ];
in rec {
  packageJson = transformJsonFile "${src}/package.json" (p: p // {
    dependencies = builtins.mapAttrs (k: v:
      if lib.hasPrefix "git+" v
      then (lib.importJSON packageLockJson).dependencies.${k}.version
      else v
    ) p.dependencies;
  });

  packageLockJson = transformJsonFile ./package-lock.json (p: p // {
    dependencies = builtins.mapAttrs (k: v:
      if v ? from
      then v // { from = v.version; }
      else v
    ) p.dependencies;
  });
};

@charukiewicz
Copy link

@Sohalt @andir we happen to be trying to use this tool for one of our projects and ran into this issue with git links. Is there any likelihood this PR will be merged in the near future? Is there anything that it still needs before merging?

@YoshiRulz
Copy link

YoshiRulz commented Oct 22, 2023

It needs rewriting for the v2 API. I gave it a go but it's too dissimilar from v1 for me to work out.

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

Successfully merging this pull request may close these issues.

Support git+http(s) versions
7 participants