!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

885 Members
179 Servers

Load older messages


SenderMessageTime
14 Jun 2023
@emilazy:matrix.orgemily did a convention ever develop for outputs for "library stuff that is per-system"? like a nixpkgs-based makeXPackage. obviously there's legacyPackages but that sucks. lib.${system}.makeXPackage? I think I've seen functions.${system}.makeXPackage? 04:35:10
@raphi:tapesoftware.netraphi changed their display name from raphi (element unread channel fix when) to raphi.07:03:24
@ronnypfannschmidt:matrix.org@ronnypfannschmidt:matrix.organyone aware of a way to ensure all outputs of a flake are cached/stored on a local build7substutute server?16:39:18
15 Jun 2023
@ulli:hrnz.li@ulli:hrnz.li set a profile picture.22:20:27
18 Jun 2023
@winston:milli.ng@winston:milli.ngBaby stepped my way into flakes today for my NixOS system, let see what all the hubub is about 04:33:15
@emilazy:matrix.orgemily why does inputs.foo.inputs.bar.follows = "quux"; give error: cannot find flake 'flake:bar' in the flake registries 09:12:57
@emilazy:matrix.orgemilyRedacted or Malformed Event09:13:24
@emilazy:matrix.orgemily * why does inputs.foo.inputs.bar.inputs.quux.follows = "quux2"; give error: cannot find flake 'flake:bar' in the flake registries 09:13:37
@emilazy:matrix.orgemilylike,e is there no way to override a nested input without adding a top-level input for the intermediate?09:13:48
@emilazy:matrix.orgemily * like, is there no way to override a nested input without adding a top-level input for the intermediate?09:13:55
@jassu:kumma.juttu.asiaJassukoAlso, is there really no way to override all nixpkgs instances of child flakes? If using more than few flakes it seems to grow into a horror show of a pile of different nixpkgs versions required for using the parent flake. 11:21:09
@madonius:entropia.de/madonius[er|he] changed their display name from /madonius [er|him] to madonius [PL].12:00:01
@tzycce:matrix.orgtzycce joined the room.12:52:16
@kranzes:matrix.orgIlan Joselevich (Kranzes)
In reply to @winston:milli.ng
Baby stepped my way into flakes today for my NixOS system, let see what all the hubub is about
https://ayats.org/blog/channels-to-flakes
12:57:49
@kranzes:matrix.orgIlan Joselevich (Kranzes)

Resources for undertanding flakes:

  • https://www.tweag.io/blog/2020-05-25-flakes
  • https://www.tweag.io/blog/2020-06-25-eval-cache
  • https://www.tweag.io/blog/2020-07-31-nixos-flakes
  • https://youtu.be/UeBX7Ide5a0
  • https://nixos.wiki/wiki/Flakes
12:58:35
@madonius:entropia.de/madonius[er|he] changed their display name from madonius [PL] to /madonius[er|he].15:33:36
@emilazy:matrix.orgemily
In reply to @jassu:kumma.juttu.asia
Also, is there really no way to override all nixpkgs instances of child flakes? If using more than few flakes it seems to grow into a horror show of a pile of different nixpkgs versions required for using the parent flake.
I assume doing inputs.X.inputs.nixpkgs.follows = "nixpkgs"; manually doesn't satisfy (hence "all")?
20:48:45
@emilazy:matrix.orgemilyoh, that was in reply to my own follows question so I guess no :)20:48:54
@winston:milli.ng@winston:milli.ng
In reply to @kranzes:matrix.org
https://ayats.org/blog/channels-to-flakes

Thank you.

I am still in a rough in-between state, but its working right now. https://github.com/wrmilling/nixos-configuration

22:36:30
19 Jun 2023
@jhu:pikaviestin.fiJhu Do you have experience with dream2nix and nodejs projects? I get flat out segfault from nix run when trying to run detect-projects. Does not seem to matter if running it through a local flake output, or independently directly from github. 10:48:56
@j-k:matrix.orgj-k best to discuss in #dream2nix:nixos.org 11:58:13
@pajarove:matrix.orgpajarove

how exactly should I specify runtime dependencies in mkDerivation?

{
  description = "";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let pkgs = import nixpkgs { inherit system; };
      in {
        devShells.default = pkgs.mkShell {
          packages = with pkgs; [ curl fzf jq moreutils screenfetch ];
          shellHook = "echo 'entering dev shell'";
        };
        defaultPackage = pkgs.stdenv.mkDerivation {
          name = "cgpt";
          src = self;
          buildDeps = with pkgs; [ curl fzf jq moreutils screenfetch ];
          buildPhase = "true";
          installPhase = "mkdir -p $out/bin; install -t $out/bin cgpt";
        };
      });
}

14:01:31
@pajarove:matrix.orgpajarove screenfetch shows up in nix-store --query --requisites --include-outputs '/nix/store/ld114b4f08vvl8d0n4ckqfjpssmi827g-cgpt.drv, but is not available to the cgpt script (a random chatgpt repl I had in my scripts folder) 14:02:43
@pajarove:matrix.orgpajaroveit does work in the devshell14:04:18
@j-k:matrix.orgj-k

it depends on how the thing you're packaging resolves runtime dependencies.

you probably want makeWrapper to provide it a PATH if you search nixpkgs you should find some examples.
maybe look at mons


fyi this question isn't specific to flakes

15:10:16
@pajarove:matrix.orgpajaroveyeah, that's what I found, probably should make a wrapper15:20:32
@0xmrtt:projectsegfau.lt@0xmrtt:projectsegfau.lt joined the room.22:24:39
20 Jun 2023
@tioan:dunwyn.xyz@tioan:dunwyn.xyz joined the room.07:59:31
21 Jun 2023
@antifuchs:asf.computer@antifuchs:asf.computer Is there a way using git+ssh URLs to reference a pull request branch on github? I'm trying nix flake metadata 'git+ssh://git@github.com/antifuchs/home?ref=pulls/298/head' (private repo, sorry) and that says it can't find remote ref refs/heads/pulls/298/head 17:48:11
@adam:valkor.net@adam:valkor.netis that PR from a fork or the same repo?17:50:37

Show newer messages


Back to Room ListRoom Version: 6