!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

888 Members
179 Servers

Load older messages


SenderMessageTime
11 Aug 2023
@charles:computer.surgeryCharlesyou could have a scheduled/periodic CI run that bumps flake.lock and then have all machines pull and rebuild20:37:43
13 Aug 2023
@khalilsantana:matrix.org@khalilsantana:matrix.org joined the room.00:01:02
@10leej:matrix.org@10leej:matrix.org joined the room.01:24:54
@petrichor:envs.net@petrichor:envs.net is there a way to tell nix never to copy a given file into the store from a flake, that isn't dependent on the vcs being used? 12:24:00
@antifuchs:asf.computer@antifuchs:asf.computerI tend to use the various source-cleaning functions for that, e.g. https://github.com/NixOS/nixpkgs/blob/master/lib/sources.nix#L2616:54:21
@antifuchs:asf.computer@antifuchs:asf.computerrequires that any references you make are based on pre-cleaned trees already, so it's not fully easy tbh16:54:50
@ulli:hrnz.li@ulli:hrnz.li
In reply to @petrichor:envs.net
is there a way to tell nix never to copy a given file into the store from a flake, that isn't dependent on the vcs being used?
every file in a flake is in the store.
20:54:29
@ulli:hrnz.li@ulli:hrnz.liif it's not in the store, it's not part of the flake20:54:38
14 Aug 2023
@petrichor:envs.net@petrichor:envs.netOK, so I want to be able to tell nix that not every file in the source tree while I'm developing it is part of a flake 09:00:10
@petrichor:envs.net@petrichor:envs.netthat's easy with git, but I don't know how to do it with any other vcs (or none) 09:00:38
@petrichor:envs.net@petrichor:envs.net e.g. maybe a .flakeignore file, a la .dockerignore? https://docs.docker.com/engine/reference/builder/#dockerignore-file 16:31:21
15 Aug 2023
@lenny:flipdot.org@lenny:flipdot.org changed their display name from Lenny. to Lenny. 7913.14:47:42
@cafkafk:nixos.devChristina Sørensen changed their profile picture.14:58:02
@10leej:matrix.org@10leej:matrix.org left the room.19:34:10
16 Aug 2023
@lxsameer:matrix.orglxsameerhey folks, is it possible to have multiple devShells for a platform? for example, one with glibc and one with musl under linux?22:21:46
@kranzes:matrix.orgIlan Joselevich (Kranzes)Yep, the flake schema is devShells.x86_64-linux.X23:04:46
@kranzes:matrix.orgIlan Joselevich (Kranzes)
      devShells.x86_64-linux = {
        clang = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
          packages = [ pkgs.hello ];
        };
        gcc = pkgs.mkShell {
          packages = [ pkgs.cmatrix ];
        };
      };
23:11:05
@kranzes:matrix.orgIlan Joselevich (Kranzes)devShells.${system} is an attrset23:11:17
@kranzes:matrix.orgIlan Joselevich (Kranzes)what's the musl stdenv that I don't know23:11:59
@crtified:crtified.meCRTified
In reply to @kranzes:matrix.org
      devShells.x86_64-linux = {
        clang = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
          packages = [ pkgs.hello ];
        };
        gcc = pkgs.mkShell {
          packages = [ pkgs.cmatrix ];
        };
      };
Where's pkgs coming from there?
23:21:53
@kranzes:matrix.orgIlan Joselevich (Kranzes)let binding23:22:08
@crtified:crtified.meCRTifiednixpkgs instantiation? 23:22:10
@kranzes:matrix.orgIlan Joselevich (Kranzes)inputs.nixpkgs.legacyPackages.x86_64-linux23:22:30
@crtified:crtified.meCRTified👌 Just wanted to be sure whether devShells behaves differently 23:22:46
@kranzes:matrix.orgIlan Joselevich (Kranzes)
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

  outputs = inputs:
    let
      system = "x86_64-linux";
      pkgs = inputs.nixpkgs.legacyPackages.${system};
    in
    {
      devShells.${system} = {
        clang = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
          packages = [ pkgs.hello ];
        };
        gcc = pkgs.mkShell {
          packages = [ pkgs.hello ];
        };
      };
    };
}
23:23:14
@kranzes:matrix.orgIlan Joselevich (Kranzes)really basic flake for 1 system architecture23:23:37
@lxsameer:matrix.orglxsameerPretty cool. Thanks folks23:31:13
17 Aug 2023
@lxsameer:matrix.orglxsameer hey friends, I have a very basic flake that follows. when i do nix flake show I get error: expected a derivation. Where might be the error? is there any way to get a traceback? 11:04:36
@lxsameer:matrix.orglxsameer
  description = "A very basic flake";

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

  outputs = { self, nixpkgs, flake-utils, ... }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
      in
        rec {
          devShells.${system} = {
            clang = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
              packages = [ pkgs.hello ];
            };
            gcc = pkgs.mkShell {
              packages = [ pkgs.hello ];
            };
          };
        }
    );
}
11:04:47
@lxsameer:matrix.orglxsameer *
  description = "A very basic flake";

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

  outputs = { self, nixpkgs, flake-utils, ... }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
      in
        rec {
          devShells.${system} = {
            clang = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
              packages = [ pkgs.hello ];
            };
            gcc = pkgs.mkShell {
              packages = [ pkgs.hello ];
            };
          };
        }
    );
}
11:05:01

Show newer messages


Back to Room ListRoom Version: 6