| 17 Aug 2023 |
CRTified | In that case, you should probably ask in #nix:nixos.org as it's not really flake specific | 22:19:45 |
CRTified | (but to keep it short: you can use the packages as part of a string and it will get resolved as a store path, so something like "${some Derivation}" is a string containing the path to the store) | 22:21:16 |
lxsameer | thank you 🙇 | 22:21:41 |
CRTified | https://nixos.org/manual/nix/unstable/language/string-interpolation.html there are derivations explicitly listed as interpolateable | 22:22:58 |
lxsameer | Thanks a million | 22:23:12 |
| jthulhu changed their display name from jthulhu to Evan. | 22:49:50 |
| 18 Aug 2023 |
| jthulhu changed their display name from Evan to jthulhu. | 01:18:41 |
| Shados joined the room. | 05:42:11 |
lxsameer | hey friends, I'm trying to create a musl based shell using devShell like this:
devShells = {
${x86_64-linux} = nixpkgs.pkgsCross.libcxxStdenv.mkShell {
nativeBuildInputs = native_build_inputs nixpkgs.pkgsCross;
buildInputs = build_inputs nixpkgs.pkgsCross;
shellHook = ''fish && exit'';
};
| 19:06:53 |
lxsameer | but I get an error that says: error: attribute 'pkgsCross' missing | 19:07:18 |
lxsameer | should I do anything special to access pkgsCross? | 19:07:41 |
CRTified | Is nixpkgs your nixpkgs flake input? If yes, check out the legacyPackages attribute | 19:14:37 |
lxsameer | yes it is. ok let me try | 19:15:02 |
lxsameer | should I import nixpkgs even though it passed as an argument ? | 19:17:32 |
CRTified | In reply to @lxsameer:matrix.org should I import nixpkgs even though it passed as an argument ? Either you do that, passing an appropriate system value along, or you use nixpkgs.legacyPackages.x86_64-linux.pkgsCross.foooooo | 19:20:43 |
CRTified | (sorry, on mobile right now, so it's a pain to do proper markdown) | 19:21:10 |
lxsameer | ahhhhh, got it, I was missing x86_64-linux part | 19:21:19 |
lxsameer | thank you | 19:21:22 |
| 19 Aug 2023 |
| mr-qubo joined the room. | 11:24:52 |
mr-qubo | 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? | 11:26:30 |
| theoretical-types joined the room. | 12:47:39 |
| @khalilsantana:matrix.org left the room. | 19:50:49 |
Artturin | 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 | 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 | {
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 |
| Oro (any/all) changed their display name from Dallas Strouse (she/her) to Dallas Strouse (she/her) 🧑🏫. | 21:35:36 |
| 20 Aug 2023 |
| ttamttam joined the room. | 04:32:26 |
| @erremilia:matrix.org joined the room. | 17:51:15 |
| abstract-logic-tree joined the room. | 20:42:08 |
| 21 Aug 2023 |
| @alper-celik:matrix.org joined the room. | 06:06:39 |