nix-community / bundix

Generates a Nix expression for your Bundler-managed application. [maintainer=@manveru]
163 stars 55 forks source link

Feature/builtins fetchgit #72

Open kraem opened 4 years ago

kraem commented 4 years ago

This hopefully solves https://github.com/nix-community/bundix/issues/69

~Works in tandem with https://github.com/kraem/nixpkgs/blob/bb4b2da585dd0186b3c1cec9fb9f7f9227cf428c/pkgs/development/ruby-modules/gem/default.nix#L67-L70 I'll create a PR in nixpkgs for that as soon as this has been reviewed and approved :+1:~

edit ~Apparently the bin wrappers in nixpkgs for gems needs some more work before this is ready. The gems gets installed, but in in the wrong path in /nix/store.~ /edit

edit2 Now works in tandem with this fork nixpkgs. Haven't tried with private git gems that have executables yet. /edit2

The responsibility for fetching the repo and calculating a sha256 is now transfered to nix's builtins.fetchGit which doesn't do it in a sandbox but can use the current users ssh credentials.

All gems fetched from git now gets the type buitlins-git, but the old type git is saved in bundlerEnv for backwards compatibility.

Thanks a lot for your time to explain how all of this fits together @manveru

I haven't written many lines ruby before so I'm sure there are a lot of things that could look nicer.