!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

890 Members
179 Servers

Load older messages


SenderMessageTime
8 Nov 2021
@yuu:matrix.orgyuu joined the room.01:07:50
@j0xaf:matrix.orgj0xaf set a profile picture.10:13:24
@lyle:menteeth.usIslandUsurper ultranix, flakes don't particularly care what's in the derivation, so why are you looking for that specifically? Any multi-language project should be pretty easy to convert to flakes. 15:21:16
@jez:petrichor.meJez (he/him) 🌦️ changed their display name from Jez (he/him) to Jez (he/him) 🌦️.17:11:33
9 Nov 2021
@nurelin:matrix.orgnurelin set a profile picture.16:05:02
@lovesegfault:matrix.orglovesegfault

Is it possible to have a structure like this with flakes:

foo
├── bar
│   └── flake.nix
├── baz
│   └── flake.nix
└── flake.nix

Where bar and baz's flakes use a lib attr exposed by the flake.nix in the parent foo dir?

18:37:35
@lovesegfault:matrix.orglovesegfault When I try I get error: relative path '../' points outside of its parent's store path '/nix/store/yd4jpnk2l1axgmzzc3qbzdgryd2gdxsf-source' 18:38:01
@lovesegfault:matrix.orglovesegfault cc. Robert Hensing (roberth) who seems to have done some work on relpaths in flakes 18:38:11
@lovesegfault:matrix.orglovesegfault

Inputs in the bar/baz flakes looks like this:

  inputs = {
    foo.url = "path:../";
  };
18:38:41
@lovesegfault:matrix.orglovesegfault

Error from my actual project:

error: relative path '../' points outside of its parent's store path '/nix/store/yd4jpnk2l1axgmzzc3qbzdgryd2gdxsf-source'

       … while fetching the input 'path:../'

       … while updating the flake input 'genesis'

       … while updating the lock file of flake 'git+file:///home/bemeurer/src/genesis?dir=voyager'
18:40:39
@roberthensing:matrix.orgRobert Hensing (roberth) lovesegfault: relative paths are a bit underdeveloped. I did write this https://github.com/NixOS/nix/pull/5437 to fix "normal" relative paths support, but more work needs to be done to support .. 18:40:48
@roberthensing:matrix.orgRobert Hensing (roberth)right now relative paths are treated like a fetcher, thus ignoring the special nature of relative paths18:42:12
@lovesegfault:matrix.orglovesegfaultInteresting, so relpaths can only go "forward" into the directory structure?18:42:27
@roberthensing:matrix.orgRobert Hensing (roberth)yes, that is a consequence of the current implementation18:42:38
@roberthensing:matrix.orgRobert Hensing (roberth)inputs with relative paths should probably be represented by a storepath + subpath pair, (OT) similar to https://github.com/NixOS/nixpkgs/pull/112083 coincidentally18:44:27
@lovesegfault:matrix.orglovesegfaultI wonder if I can workaround this by abusing symlinks in my repo18:47:03
@roberthensing:matrix.orgRobert Hensing (roberth)there's probably many ways this feature could be reimagined18:47:07
@lovesegfault:matrix.orglovesegfaultAnother thing I find myself wanting is a way to share flake locks18:48:00
@lovesegfault:matrix.orglovesegfaultlike, I have one repo with many flakes, but I want one shared lockfile18:48:15
@roberthensing:matrix.orgRobert Hensing (roberth)I'd lean towards such a design for relative path flakes18:49:30
@roberthensing:matrix.orgRobert Hensing (roberth)no lock file and no locking of the relative flake either18:50:01
@roberthensing:matrix.orgRobert Hensing (roberth)i.e. don't fetch them, but use a subpath of self18:50:37
@lovesegfault:matrix.orglovesegfaultyup18:51:09
@roosemberth:orbstheorem.chRoos left the room.18:51:31
@andi:kack.itandi-How would that handle building only a subflake? (think partial checkout)23:49:32
10 Nov 2021
@rickynils:nixos.devRickard Nilsson joined the room.11:22:12
@figsoda:matrix.orgfigsoda
In reply to @andi:kack.it
How would that handle building only a subflake? (think partial checkout)
Is ?dir= what you want?
13:50:09
@andi:kack.itandi-No I mean the situation that subflakes wont have a lockfile13:50:24
11 Nov 2021
@turbounicorn:matrix.orgGogu de la Gazé joined the room.12:20:48
@cafkafk:matrix.orgcafkafk set a profile picture.18:05:38

Show newer messages


Back to Room ListRoom Version: 6