rvl / bower2nix

Generate nix expressions to fetch bower dependencies.
Other
6 stars 10 forks source link

fetchbower: support for git repositories #9

Closed domenkozar closed 7 years ago

domenkozar commented 7 years ago

bower2nix generates following line for a git repository:

(fetchbower "purescript-prim" "hdgarrood/purescript-prim" "hdgarrood/purescript-prim" "0434lf7pkmpyb9pn3yjppmj9mqnx064xaqmjlrcq1vkbwn69n50c")

And then when building the bower project, Nix fails with:

error: invalid character ‘/’ in name ‘purescript-prim-hdgarrood/purescript-prim’

Sounds like an easy fix, but haven't looked into it yet.

rvl commented 7 years ago

Are you able to influence the bower.json at all? Because as a workaround, this does work:

{
  "name": "github-deps",
  "dependencies": {
    "purescript-prim": "hdgarrood/purescript-prim#e3ed5100a6b7da41f854775800f6dae8965e5d1e"
  }
}
domenkozar commented 7 years ago

I'll try that, thanks.

domenkozar commented 7 years ago

It generated the following:

(fetchbower "purescript-avm-i18n" "git@github.com:input-output-hk/avm-language-pack.git#0fa75a39040ef0e27176cb753f3e1f97816148fc" "git@github.com:input-output-hk/avm-language-pack.git#0fa75a39040ef0e27176cb753f3e1f97816148fc" "178h9j8jq9wi5845f5pxhhhqw6x022nzmpzm4di8fgsdl1f6nr5d")

But the hash was wrong. After I change it manually, doing nix-build yields

bower purescript-avm-i18n#0fa75a39040ef0e27176cb753f3e1f97816148fc           ENOCACHE No cached version for git@github.com:input-output-hk/avm-language-pack.git#0fa75a39040ef0e27176cb753f3e1f97816148fc

I'll try the workaround.

domenkozar commented 7 years ago

It seems the package is not in /nix/store/ydbw9qh7ayw4gxbl222bcg08sn5pz8j5-bower-env/packages/

domenkozar commented 7 years ago

That's actually another package coming from a private git repo. I'll investigate.

domenkozar commented 7 years ago

My current assumption is that since it's a private package, fetchbower has no permission to use it (no access to SSH keys).

domenkozar commented 7 years ago

So this works now, private repositories are a different issue which is hard to solve, I'd say.