| 12 Jan 2025 |
@phaitonican:matrix.org | im not sure why my google not find this thanks | 01:26:20 |
@phaitonican:matrix.org | {
lib,
fetchFromGitHub,
rustPlatform,
libcosmicAppHook,
libdisplay-info,
libgbm ? null,
libinput,
mesa,
pixman,
pkg-config,
seatd,
stdenv,
udev,
xwayland,
useXWayland ? true,
systemd,
useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
nix-update-script,
}:
rustPlatform.buildRustPackage {
pname = "cosmic-comp";
version = "1.0.0-alpha.5-unstable-2025-01-07";
src = fetchGit {
url = "https://github.com/phaitonican/cosmic-comp";
rev = "9c028c17bb8cc4a6f8a8abc40824a5d74bee6818";
ref = "gtk-border-dev";
};
useFetchCargoVendor = true;
cargoHash = "sha256-P4/Y70vnyIR5JBpHCOhqLlyfan29eNsExkt3ux7joRw=";
separateDebugInfo = true;
nativeBuildInputs = [
libcosmicAppHook
pkg-config
];
buildInputs = [
libdisplay-info
(if libgbm != null then libgbm else mesa)
libinput
pixman
seatd
udev
] ++ lib.optional useSystemd systemd;
# only default feature is systemd
buildNoDefaultFeatures = !useSystemd;
# TODO: remove when <https://github.com/NixOS/nixpkgs/pull/371795> reaches nixos-unstable and nixos-24.11
postConfigure = ''
substituteInPlace ../.cargo/config.toml --replace-fail 'branch = "feature%2Fcopy_clone"' 'branch = "feature/copy_clone"'
'';
dontCargoInstall = true;
makeFlags = [
"prefix=${placeholder "out"}"
"CARGO_TARGET_DIR=target/${stdenv.hostPlatform.rust.cargoShortTarget}"
];
preFixup = lib.optionalString useXWayland ''
libcosmicAppWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ xwayland ]})
'';
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"epoch-(.*)"
];
};
meta = with lib; {
homepage = "https://github.com/pop-os/cosmic-comp";
description = "Compositor for the COSMIC Desktop Environment";
license = licenses.gpl3Only;
maintainers = with maintainers; [
# lilyinstarlight
];
platforms = platforms.linux;
mainProgram = "cosmic-comp";
};
}
| 01:29:31 |
@phaitonican:matrix.org | I have to rewrite this so it point to my (local) prebuilt binary | 01:30:07 |
@phaitonican:matrix.org | instead of completlely rebuilding it from a github repo | 01:30:25 |
@phaitonican:matrix.org | not sure if this was flake related sorry | 01:30:51 |
elikoga | In reply to @phaitonican:matrix.org not sure if this was flake related sorry Please don't feel bad for asking any questions, I'm just trying to understand why every single message in here is unrelated to the channel. I'm wondering: What public communication indicates to you that this is related to flakes? This is not related to pinning any flake input in any flake lockfile. This is not related about the output forms tod the flake. This is not related to any of the new commands introduced to work with flakes. I am not sure what else I'm missing, except for the fact that the flake interface is the only sane mechanism to use nix (the packaging/building language) unless you want to write your own locking script, use someone elses, or edit hashes by hand every time someone makes a new commit somewhere. (or use channels God forbid) | 01:31:55 |
@phaitonican:matrix.org | haha :D yea you are right its nix language related | 01:32:29 |
@phaitonican:matrix.org | i am very new to this sorry | 01:32:39 |
elikoga | If many people's first touching point of using nix properly is via flakes, then maybe we should hurry up and stabilize it 👀 | 01:33:00 |
elikoga | *not every single message just a significant fraction | 01:34:29 |
@phaitonican:matrix.org | no comment :b | 01:35:55 |
elikoga | Wait no way, we don't have any channels related to packaging? Is nix flakes really topically closest | 01:36:19 |
| willow joined the room. | 07:52:32 |
| willow removed their profile picture. | 08:01:44 |
| willow changed their display name from Willowshine to willow. | 08:02:15 |
| Rayane Nakib (ريّان نقيب) joined the room. | 12:37:06 |
| 14 Jan 2025 |
| @kimblo:matrix.org left the room. | 11:43:54 |
| 15 Jan 2025 |
| Joel joined the room. | 17:26:04 |
| 16 Jan 2025 |
| @mdnlss:matrix.org changed their display name from mdnlss to smolpatches. | 03:12:03 |
| @mdnlss:matrix.org left the room. | 03:18:14 |
| gotha joined the room. | 06:51:32 |
gotha | hey, I am using direnv with flakes to install dev dependencies.
My issue is that some packages are not available for aarch64-darwin (helm for example), I know nix-darwin can install packages using homebrew.
Is there a way to install homebrew package via flake and direnv? | 06:53:44 |
WeetHet | In reply to @gotha:matrix.org hey, I am using direnv with flakes to install dev dependencies. My issue is that some packages are not available for aarch64-darwin (helm for example), I know nix-darwin can install packages using homebrew. Is there a way to install homebrew package via flake and direnv? Brew formulas have dependencies that have to be installed alongside them. Brew also defines builds for those which would be very hard to replicate. It's probably easier to go add aarch64-darwin support for the package you wanna use | 07:11:26 |
gotha | thank you, I thought so, but I wanted to check if this is something that is done in general | 07:17:38 |
| 17 Jan 2025 |
netpleb | if I want a flake output of nixosConfigurations.hello-world but need it to exist for each system architecture, is there a trick to do that? Doing this:
let
forEachSystem = nixpkgs.lib.genAttrs [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
in {
nixosConfigurations = forEachSystem (system: {
# include our module
self.outputs.nixosModules.default
./examples/hello-world-configuration.nix
];
};
};
almost gets me there but it makes me do nix build .#nixosConfigurations.x86_64-linux.hello-world but I want to get rid of that x86_64-linux part of the command and cannot figure out the trick to do so.
| 23:54:52 |
| 18 Jan 2025 |
netpleb | figured it out. Needed to us the // operator: nixosConfigurations = forEachSystem (system: { hello-world = .... }) // { hello-world = self.nixosConfigurations.x86_64-linux.hello-world; }; | 01:14:17 |
netpleb | * if I want a flake output of nixosConfigurations.hello-world but need it to exist for each system architecture, is there a trick to do that? Doing this:
let
forEachSystem = nixpkgs.lib.genAttrs [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
in {
nixosConfigurations = forEachSystem (system: {
hello-world = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
# include our module
self.outputs.nixosModules.default
./examples/hello-world-configuration.nix
];
};
default = self.nixosConfiguration.${system}.hello-world;
};
almost gets me there but it makes me do nix build .#nixosConfigurations.x86_64-linux.hello-world but I want to get rid of that x86_64-linux part of the command and cannot figure out the trick to do so.
| 01:15:17 |
netpleb | * if I want a flake output of nixosConfigurations.hello-world but need it to exist for each system architecture, is there a trick to do that? Doing this:
let
forEachSystem = nixpkgs.lib.genAttrs [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
in {
nixosConfigurations = forEachSystem (system: {
hello-world = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
# include our module
self.outputs.nixosModules.default
./examples/hello-world-configuration.nix
];
};
default = self.nixosConfiguration.${system}.hello-world;
});
almost gets me there but it makes me do nix build .#nixosConfigurations.x86_64-linux.hello-world but I want to get rid of that x86_64-linux part of the command and cannot figure out the trick to do so.
| 01:15:40 |
| 19 Jan 2025 |
| Waldemar Tomme (they/them) changed their display name from Waldemar Tomme to Waldemar Tomme (they/them). | 08:17:03 |
| 21 Jan 2025 |
| rouma7 changed their profile picture. | 13:15:38 |