rvl / bower2nix

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

GitHub URLs not working #17

Closed jluttine closed 6 years ago

jluttine commented 6 years ago

bower.json:

{
  "name": "nextcloud-calendar",
  "dependencies": {
    "angular": "1.6.4",
    "angular-bootstrap": "2.5.0",
    "jquery-timepicker": "883bb2cd94",
    "jstzdetect": "https://github.com/georgehrke/jstimezonedetect.git",
    "ical.js": "1.2.2",
    "fullcalendar": "3.4.0",
    "hsl_rgb_converter": "https://github.com/kayellpeee/hsl_rgb_converter.git"
  },
  "devDependencies": {
    "angular-mocks": "1.6.4"
  }
}

bower-generated.nix generated by bower2nix:

# Generated by bower2nix v3.2.0 (https://github.com/rvl/bower2nix)
{ fetchbower, buildEnv }:
buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
  (fetchbower "angular" "1.6.4" "1.6.4" "0d2rfw9763qsggwp72i29n7dllk539y9djzy7jpwxzg7a03kq0xj")
  (fetchbower "angular-bootstrap" "2.5.0" "2.5.0" "1hgycif9w3zc2j6ig7wi9hyfxvm8is8h74zpkrrsrfsaabx28b1y")
  (fetchbower "jquery-timepicker" "883bb2cd94" "883bb2cd94" "1qbb3zvs26j0c5fjwjv5jfgba7z4nsjly37g89nqm60j5x44f853")
  (fetchbower "jstzdetect" "https://github.com/georgehrke/jstimezonedetect.git" "https://github.com/georgehrke/jstimezonedetect.git" "1a81hxn7xz0w0w2av7y4zc2jq99m6gjc8v738x3ncwwd2xiy2sg6")
  (fetchbower "ical.js" "1.2.2" "1.2.2" "1liq4nqx5hf313i0fjf35qh77psh4a0dyg6gkwcraia8dn15cc08")
  (fetchbower "fullcalendar" "3.4.0" "3.4.0" "1xdqd2r6jngh5afjgw3p9bhbrxbjryvy25igppyh0rvgbaxhgm1b")
  (fetchbower "hsl_rgb_converter" "https://github.com/kayellpeee/hsl_rgb_converter.git" "https://github.com/kayellpeee/hsl_rgb_converter.git" "1n0mrjp6gcqr65vbqnkj0y9kc3hs4ymklyiyqvw0rpqpgrg1jkb1")
  (fetchbower "angular-mocks" "1.6.4" "1.6.4" "0w4nch7zws18ggxgrgsg2i5p1kxp5gpm0352pjr2a7rjd4l3w8ll")
  (fetchbower "jquery" "3.2.1" "2 - 3" "1wfj9lm5qpdqamnwzj6pg56s0vrs162p2faiydvklcd4q1mq04jk")
  (fetchbower "moment" "2.19.1" "^2.9.0" "1gj5npzb23pr9sk37vpklbarnpqrh3xb6chnjdnnrnskc8dqr4a6")
]; }

In default.nix, I use:

 bowerComponents = pkgs.buildBowerComponents {
    name = "nextcloud-calendar-bower";
    generated = ./js/bower-generated.nix;
    src = ./js;
  };

But I get an error when launching nix-shell:

error: invalid character ‘:’ in name ‘jstzdetect-https://github.com/georgehrke/jstimezonedetect.git’

Am I doing something wrong or any ideas what is the issue? Should I write those GitHub URLs differently?

jluttine commented 6 years ago

Modifying the GitHub URLs in bower.json as follows fixes the issue:

{
  "name": "nextcloud-calendar",
  "dependencies": {
    "angular": "1.6.4",
    "angular-bootstrap": "2.5.0",
    "jquery-timepicker": "883bb2cd94",
    "jstzdetect": "georgehrke/jstimezonedetect#bb4631925a2bb2a4905af5462c8ef232c5ab9923",
    "ical.js": "1.2.2",
    "fullcalendar": "3.4.0",
    "hsl_rgb_converter": "kayellpeee/hsl_rgb_converter#3936a3896dd2f45a5c66317aab6f9175c9fde9fb"
  },
  "devDependencies": {
    "angular-mocks": "1.6.4"
  }
}