!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

893 Members
180 Servers

Load older messages


SenderMessageTime
28 Oct 2021
@balsoft:balsoft.rubalsoftWell yeah00:12:51
@balsoft:balsoft.rubalsoftBut that will be not very efficient00:12:59
@balsoft:balsoft.rubalsoft gitlab:foo/bar is better 00:13:04
@enzime:nixos.devEnzime
In reply to @balsoft:balsoft.ru
But that will be not very efficient
oh why's that?
00:14:11
@balsoft:balsoft.rubalsoft gitlab: just fetches a pre-made tarball 00:14:53
@balsoft:balsoft.rubalsoft And the git fetcher is meh 00:15:03
@balsoft:balsoft.rubalsoft There are some details in either this room or the #nix-dev:nixos.org 00:15:21
@balsoft:balsoft.rubalsoftI don't remember exactly, sorry :D00:15:27
@enzime:nixos.devEnzime
$ nix flake check "gitlab:veloren/dev/veloren?ref=yusdacra/chore/nix"
error: URL 'gitlab:veloren/dev/veloren?ref=yusdacra/chore/nix' contains multiple branch/tag names
00:30:38
@enzime:nixos.devEnzime yeah definitely looks like gitlab: and github: are built with the fundamental assumption that gitlab:A/B B can't contain slashes 00:31:13
@bew:matrix.orgbew yeah that's because the flake ref syntax is git{hub,lab}:org/repo/branch?options 00:57:42
@tomberek:matrix.orgtomberekgitlab allows for sub-organizations, i'm not dealing with any right now, but this assumption may not work in those cases...... can we just tweak the parsing or spec of the flake ref syntax?00:59:30
@bew:matrix.orgbew
In reply to @balsoft:balsoft.ru
I think git+https is the best you can do :/
as he said, that's the only way to use a repository at an arbitrary url
01:00:52
@bew:matrix.orgbew
In reply to @balsoft:balsoft.ru
I think git+https is the best you can do :/
* as he said, that's the only way I know to use a repository at an arbitrary url
01:01:12
@colemickens:matrix.orgcolemickens ๐Ÿณ๏ธโ€๐ŸŒˆCan you url-encode the slash in the repo name?01:06:31
@colemickens:matrix.orgcolemickens ๐Ÿณ๏ธโ€๐ŸŒˆI guess urlencoding it might just pass it through the url that way which might not work either, idk.01:06:52
@enzime:nixos.devEnzime
In reply to @colemickens:matrix.org
Can you url-encode the slash in the repo name?
$ nix flake check "gitlab:veloren/dev%2Fveloren?ref=yusdacra/chore/nix"
[99.1/0.0 MiB DL] downloading 'https://gitlab.com/api/v4/projects/veloren%2Fdev%2Fveloren/repository/archive.tar.gz?sha=dd059588771b7e261e9596f1e4eb121acf5e91a3'
01:09:33
@enzime:nixos.devEnzimeseems to be working01:09:35
@enzime:nixos.devEnzime๐Ÿ˜†01:09:41
@colemickens:matrix.orgcolemickens ๐Ÿณ๏ธโ€๐ŸŒˆpretty sure I just remember that from some random matrix/discourse post, glad it worked!01:14:42
@colemickens:matrix.orgcolemickens ๐Ÿณ๏ธโ€๐ŸŒˆyay for capriciously designed urls that were designed primarily with a single platform in mind!01:15:14
@colemickens:matrix.orgcolemickens ๐Ÿณ๏ธโ€๐ŸŒˆ * yay for capriciously designed vanity "uris" that were designed primarily with a single platform in mind!01:15:23
@tomberek:matrix.orgtomberekwhat! wow! that should probably be noted somewhere: https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html#examples maybe01:34:21
@colemickens:matrix.orgcolemickens ๐Ÿณ๏ธโ€๐ŸŒˆare the fetchers implemented in just nix? it would be cool to see them pulled out and maybe used instead of flake refs and it being built into nix01:40:48
@colemickens:matrix.orgcolemickens ๐Ÿณ๏ธโ€๐ŸŒˆ(if there aren't weird layering problems that would arise)01:40:58
@tomberek:matrix.orgtomberekright here: https://github.com/NixOS/nix/tree/master/src/libfetchers01:42:16
@tomberek:matrix.orgtomberekOne benefit of that instead of the nixpkgs fetchers (https://github.com/NixOS/nixpkgs/tree/master/pkgs/build-support/fetchgit) is that one can more easily utilize credentials and have fewer FODs.01:45:42
@tomberek:matrix.orgtomberekThere was some work on experimenting with other fetchers: https://github.com/target/nix-fetchers01:46:32
@sudoreboot:matrix.orgHrafn Blรณรฐbรณk
In reply to @enzime:nixos.dev
$ nix flake check "gitlab:veloren/dev%2Fveloren?ref=yusdacra/chore/nix"
[99.1/0.0 MiB DL] downloading 'https://gitlab.com/api/v4/projects/veloren%2Fdev%2Fveloren/repository/archive.tar.gz?sha=dd059588771b7e261e9596f1e4eb121acf5e91a3'
Heh, neat trick. Thanks everyone for figuring it out!
10:08:35
@balsoft:balsoft.rubalsoft
In reply to @colemickens:matrix.org
Can you url-encode the slash in the repo name?
Wow, didn't think of that one
10:09:59

Show newer messages


Back to Room ListRoom Version: 6