!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

894 Members
181 Servers

Load older messages


SenderMessageTime
19 Aug 2023
@khalilsantana:matrix.org@khalilsantana:matrix.org left the room.19:50:49
@artturin:matrix.orgArtturin
In reply to @mr-qubo:matrix.org

Hi! I'm trying to add commands to devShell, like this:

          commands = [
            {
              name = "run-client";
              command = "nixGLIntel client -v --host c71ee55ef19fb0c4b934610d-1024-game-server.challenge.master.camp.allesctf.net -p 31337 --ssl --username 'justCatTheFish!1' --password password123";
            }
          ];

But I get this error:

[...]
          162|
          163|                  commands = [
             |      ^
          164|                      {

       error: cannot coerce a set to a string

What's the correct syntax?

weird that does seem correct https://github.com/search?q=devShell+commands+language%3ANix&type=code&l=Nix
20:46:22
@lxsameer:matrix.orglxsameer hey friends, I have the following flake, my aim is to have a shell with musl, clang16 and libcxx16. But when i do nix develop nix builds clang-11 and then tries to build clang-16, but it fails with an error about a missing clang-tblgen. Given that, tablegen has to be built as part of llvm itself. Then am i doing it wrong or is it a bug. 21:29:37
@lxsameer:matrix.orglxsameer
{
  description = "Description for the project";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  };

  outputs = inputs@{ nixpkgs, ... }:
    let
      x86_64-linux = "x86_64-linux";
      arm64-linux = "arm64-linux";

      pkgsCross = nixpkgs.legacyPackages.pkgsCross.musl64;

      get_pkgs = system: nixpkgs.legacyPackages.${system};

      native_build_inputs = pkgs: with pkgs; [
        cmake
        ninja
        ccache
        llvmPackages_16.lldb
        llvmPackages_16.lld
        llvmPackages_16.libcxx
        llvmPackages_16.libcxxabi
        llvmPackages_16.compiler-rt
        nixpkgs-fmt
        bat
        git
        fish
        python3
      ];

      build_inputs = pkgs: with pkgs;
        [
          boehmgc
          llvm_16
          llvm_16
          gtest
          gmock
          zlib-ng
          zstd

        ];


      linux-shell = pkgs: {
        default = pkgs.pkgsCross.musl64.mkShell.override {
          stdenv = pkgs.pkgsCross.musl64.llvmPackages_16.libcxxStdenv;
        } {
          nativeBuildInputs = native_build_inputs pkgs.pkgsCross.musl64;
          buildInputs = build_inputs pkgs.pkgsCross.musl64;
          shellHook = ''fish && exit'';
        };
        clang = pkgs.mkShell.override { stdenv = pkgs.clang16Stdenv; } {
          nativeBuildInputs = native_build_inputs pkgs;
          buildInputs = build_inputs pkgs;
          shellHook = ''fish && exit'';
        };
        gcc = pkgs.mkShell {
          nativeBuildInputs = native_build_inputs pkgs;
          buildInputs = build_inputs pkgs;

          shellHook = ''fish && exit'';
        };
      };

    in
      {
        devShells = {
          ${x86_64-linux} = linux-shell (get_pkgs x86_64-linux);
          ${arm64-linux} = linux-shell (get_pkgs arm64-linux);
        };
      };
}

21:29:45
@orowith2os:fedora.imOro (any/all) changed their display name from Dallas Strouse (she/her) to Dallas Strouse (she/her) šŸ§‘ā€šŸ«.21:35:36
20 Aug 2023
@ttamttam:matrix.orgttamttam joined the room.04:32:26
@erremilia:matrix.org@erremilia:matrix.org joined the room.17:51:15
@abstract-logic-tree:matrix.orgabstract-logic-tree joined the room.20:42:08
21 Aug 2023
@alper-celik:matrix.org@alper-celik:matrix.org joined the room.06:06:39
@daxvena:matrix.orgdaxvena removed their profile picture.23:41:33
@daxvena:matrix.orgdaxvena set a profile picture.23:42:26
22 Aug 2023
@charlotte:vanpetegem.mechvp changed their profile picture.13:03:26
@metasyntactic:matrix.orgmetasyntacticSo, I have my main flake that I use for all my configs, and then I can add inputs at the top level, and import module configurations for all of my setup. Is there and idiomatic way for one of those modules included by modules to also be able to add their own flakes, or do you need to bring them in at the top level input and pass them down to the module using the various ways?16:08:45
@ttamttam:matrix.orgttamttam
In reply to @metasyntactic:matrix.org
So, I have my main flake that I use for all my configs, and then I can add inputs at the top level, and import module configurations for all of my setup. Is there and idiomatic way for one of those modules included by modules to also be able to add their own flakes, or do you need to bring them in at the top level input and pass them down to the module using the various ways?
You could turn your module into a flake, and then include that in the inputs. I'm not aware of a way to add inputs from inside a module, although that doesn't mean it doesn't exist. I just pass them down from the top level.
21:57:38
23 Aug 2023
@michaeldonovan:matrix.orgMichael joined the room.03:14:30
@rover:aguiarvieira.pt@rover:aguiarvieira.pt joined the room.07:30:51
@brian:bmcgee.ie@brian:bmcgee.ie left the room.09:57:34
@aloisw:kde.org@aloisw:kde.org joined the room.12:13:56
@aloisw:kde.org@aloisw:kde.org 12:14:08
25 Aug 2023
@lenny:flipdot.org@lenny:flipdot.org changed their display name from Lenny. 7913 to Lenny..12:05:03
27 Aug 2023
@antifuchs:asf.computer@antifuchs:asf.computer so I have a github job that regularly runs nix flake update and files a PR with the version bump. Is there a nice way to visualize the things that change, especially around what packages got updated? Ideally as a follow-up github action? (: 16:21:04
@kranzes:matrix.orgIlan Joselevich (Kranzes) nix flake update --commit-lock-file 16:22:10
@kranzes:matrix.orgIlan Joselevich (Kranzes)This commits the file after an update with a commit description/message indicating which things got updated16:22:28
@antifuchs:asf.computer@antifuchs:asf.computeroooooh, TIL!16:23:16
@crtified:crtified.meCRTifiedBut that only shows what changed for the inputs, i.e. the git rev16:24:12
@kranzes:matrix.orgIlan Joselevich (Kranzes) yup, if you want something for actual derivations you could use nix store diff-closures 16:24:35
@antifuchs:asf.computer@antifuchs:asf.computerHm hm hm. I think yeah, the closure diff would be preferable. Guess I’d have to identify the thing I would like to diff; but it would probably work. Hmmmmm.17:17:23
@theclearpill:matrix.orgMoritz joined the room.17:21:26
@antifuchs:asf.computer@antifuchs:asf.computerthe alternative would be to not open a PR and push to the default branch directly, it's about the same amount of scrutiny that these updates get (:18:18:32
@goodboy:matrix.orglord_fomo joined the room.21:22:29

Show newer messages


Back to Room ListRoom Version: 6