!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

899 Members
184 Servers

Load older messages


SenderMessageTime
10 Jul 2023
@petrichor:envs.net@petrichor:envs.netsince gitea archive api is compatible with github's is it possible to use a gitea repository as a flake input and have it use the same "fetch an archive" optimisation that's used for github?15:53:34
@petrichor:envs.net@petrichor:envs.netor do i need to use "git+https://gitea.example.com/user/repo"?15:54:25
@petrichor:envs.net@petrichor:envs.net

ah, just looking at https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#flake-references

looks like github and sourcehut supported, but i guess i could use the tarball type for gitea/forgejo for now

15:57:36
@2xsaiko:tchncs.de@2xsaiko:tchncs.deis there a good way to use flakes with the pijul VCS? I'd love to try out pijul because it seems like it improves upon git in a lot of ways, but the lack of flake support is the main reason why I've held off for now16:22:19
@petrichor:envs.net@petrichor:envs.net
In reply to @petrichor:envs.net

ah, just looking at https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#flake-references

looks like github and sourcehut supported, but i guess i could use the tarball type for gitea/forgejo for now

fwiw, it was as simple as:

url = "https://<host>/api/v1/repos/<user>/<repo>/archive/<ref>.tar.gz";
18:50:38
@petrichor:envs.net@petrichor:envs.net i tried github:<user>/<repo>?host=<host> but it tried to use /api/v3/… which isn't supported by gitea 18:51:41
@petrichor:envs.net@petrichor:envs.net but seems like it should be fairly straightforward to implement a gitea: scheme 18:52:24
@moots:matrix.orgmoots joined the room.21:07:07
@danielhep:matrix.orgdanielhep joined the room.21:43:41
@twitchy0:matrix.orgtwitchy0 I use git+ssh://<host>/user/repo for gitea 23:33:25
11 Jul 2023
@emilazy:matrix.orgemily
In reply to @2xsaiko:tchncs.de
is there a good way to use flakes with the pijul VCS? I'd love to try out pijul because it seems like it improves upon git in a lot of ways, but the lack of flake support is the main reason why I've held off for now
no but someone was working on it
00:15:44
@emilazy:matrix.orgemilyhttps://github.com/NixOS/nixpkgs/pull/240808 is the first step00:15:55
@2xsaiko:tchncs.de@2xsaiko:tchncs.deoh cool! (though, having flake compat would require completely different implementation in nix itself from what I understand, right?)00:21:05
@emilazy:matrix.orgemilyyeah00:38:57
@emilazy:matrix.orgemilyit was more "Nix isn't going to add a fetcher for something Nixpkgs doesn't even support"00:39:05
@poweruser64:matrix.orgPowerUser64
In reply to @2xsaiko:tchncs.de
PowerUser64: usually I think you'd patch dlopen calls to point to absolute paths (if the library path is known at build time) or looked up relative to environment variables, like for example QT_PLUGIN_PATH. Ask in the #nix:nixos.org channel though, I think that's the better place to ask for how to do this
Thanks! I was actually able to find help on the nixos forum. It turned out I needed to use NIX_LDFLAGS to make ld give the program the things it needed.
00:49:01
@ash:ashwalker.netAsh joined the room.16:07:17
@pyrox:pyrox.devPyrox [Fox/It/She] changed their display name from Pyrox [ She/They/Xem ] to Pyrox [ It/She/They/Xem ].20:43:38
12 Jul 2023
@beect:matrix.orgbeect is there an idiomatic way to produce a path relative to the root of the flake repo? i want to replace imports = [ ../../common/users.nix ] with something like imports = [ ${self}/nixos/common/users.nix ] 11:57:33
@crtified:crtified.meCRTified Not tested, but shouldn't self.outPath work there? 11:58:02
@beect:matrix.orgbeect i've tried a bunch of variations on /${self.outPath}/nixos/common/users.nix - it complains that "a string that refers to a store path cannot be appended to a path" 12:17:54
@2xsaiko:tchncs.de@2xsaiko:tchncs.de beect: both ${self} and ${self.outPath} work for me, are you sure your self is the one you get passed to your flake outputs function? 12:57:37
@2xsaiko:tchncs.de@2xsaiko:tchncs.de i.e. { outputs = { self }: { myPath = "${self}"; }; } => nix eval .#myPath => "/nix/store/..." 12:58:37
@2xsaiko:tchncs.de@2xsaiko:tchncs.deoh12:59:42
@2xsaiko:tchncs.de@2xsaiko:tchncs.de it should be imports = [ "${self}/nixos/common/users.nix" ], with the quotes 13:00:04
@2xsaiko:tchncs.de@2xsaiko:tchncs.de or (self + /nixos/common/users.nix) 13:01:27
@kranzes:matrix.orgIlan Joselevich (Kranzes)
In reply to @crtified:crtified.me
Not tested, but shouldn't self.outPath work there?
even just "${self}" would work because of string interpolation
13:07:28
@kranzes:matrix.orgIlan Joselevich (Kranzes)another design choice is to expose these common modules are nixosModules flake outputs 13:08:08
@beect:matrix.orgbeectah yup, using a string instead of a path works. thanks. it's a little ugly, thanks for the pointer to nixosModules.13:22:20
13 Jul 2023
@vcunat:matrix.orgvcunat changed their display name from @vcunat to vcunat.08:27:42

Show newer messages


Back to Room ListRoom Version: 6