25 May 2024 |
| hellwolf joined the room. | 13:56:39 |
hellwolf | How should "overlays.default" in a flake actually be used?
I try to use it in another flake. But I got "error: attribute 'overlay' missing" | 13:57:43 |
hellwolf | overlays = [
solc.overlays.defaul # <-- ?
];
| 14:00:52 |
hellwolf | {
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem
[
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
] (system:
let packages = import nixpkgs {
inherit system;
# overlays = [ solc-pkgs-overlay ];
};
in
{
inherit packages;
});
}
And what's wrong with this flake...
| 16:05:26 |
hellwolf | Nix flake check complains:
error: flake attribute 'packages.x86_64-linux.system' is not a derivation
| 16:08:17 |
hellwolf | Ah, that should be legacyPackages | 16:09:16 |
26 May 2024 |
| tim joined the room. | 06:52:51 |
| Manu [tennox] joined the room. | 07:32:17 |
| Dennis changed their display name from Dennis (7616) to Dennis. | 12:59:25 |
27 May 2024 |
| @marie:marie.cologne left the room. | 11:24:10 |
| Tanja (she/her) changed their display name from Tanja (she/her) to Tanja (☎️ 6920 at GPN22, she/her). | 20:36:03 |
| @buckley310:matrix.org left the room. | 21:23:44 |
28 May 2024 |
| clango joined the room. | 18:26:26 |
29 May 2024 |
| @sako:catgirl.cloud removed their profile picture. | 18:27:42 |
| @sako:catgirl.cloud removed their display name sako. | 18:27:52 |
| @sako:catgirl.cloud left the room. | 18:28:07 |
31 May 2024 |
| parasew | CDC joined the room. | 11:11:22 |
1 Jun 2024 |
Thatoo | After updating to 24.05, in order to install a package from 23.11, I added to flake.nix
nixpkgs_old.url = "github:NixOS/nixpkgs/nixos-23.11"; there :
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs_unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs_old.url = "github:NixOS/nixpkgs/nixos-23.11";
};
and I declare masterpdfeditor like that in my configuration.nix file :
environment.systemPackages = with pkgs; [
inputs.nixpkgs_old.legacyPackages."${pkgs.system}".masterpdfeditor
];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"masterpdfeditor"
];
nixpkgs.overlays = [ (final: prev: {
masterpdfeditor = prev.masterpdfeditor.overrideAttrs (old: {
src = prev.fetchurl {
url = "https://code-industry.net/public/master-pdf-editor-5.9.10-qt5.x86_64.tar.gz";
sha256 = "sha256-ilJhUsr96xCbM0XNQxWGAPknKKp1jj+U1+7n1e379Lc=";
};
});
})];
}
Unfortunately, I get the following error :
error: Package ‘masterpdfeditor-5.9.35’ in /nix/store/yg436dyaanpmhi3bf6qizaxa3jymlsx3-source/pkgs/applications/misc/masterpdfeditor/default.nix:40 has an unfree license (‘unfreeRedistributable’), refusing to evaluate.
a) To temporarily allow unfree packages, you can use an environment variable
for a single invocation of the nix tools.
$ export NIXPKGS_ALLOW_UNFREE=1
Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
then pass `--impure` in order to allow use of environment variables.
b) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.
Alternatively you can configure a predicate to allow specific packages:
{ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"masterpdfeditor"
];
}
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.
even though,
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"masterpdfeditor"
];
is already in configuration.nix file.
| 10:31:56 |
Thatoo | Any idea how to solve this issue? | 10:32:04 |
@conr:mozilla.org | Redacted or Malformed Event | 15:49:41 |
@conr:mozilla.org | Redacted or Malformed Event | 15:52:06 |
Industrial | Hi. I'm using github:nixos/nixpkgs/nixpkgs-23.11-darwin . Is there an unstable channel? Where can I find a list of these? I don't find darwin in https://github.com/NixOS/nixpkgs/branches/active | 16:58:12 |
tomberek | https://status.nixos.org/ and https://channels.nixos.org/ | 18:20:36 |
@abmantis:abcosta.com | In reply to @bryan.bennett:matrix.org
Abílio Costa: I missed your reply here. I am sorry for that! Both nix-direnv and flakeenv take a flake specifier for the flake you want to use: use flake /home/acosta/dev/thirdparty/nix-environments#home-assistant or use flake_env /home/acosta/dev/thirdparty/nix-environments#home-assistant should work, I would think!
I wrote and maintain flakeenv and am a maintainer of nix-direnv, so if you have trouble - please ping me here or (preferably) on the repo for the tool in question :)
thanks for the followup (which I also missed! matrix threads are not there yet 😅) | 22:14:36 |
@abmantis:abcosta.com | I've started using direnv now and it is really nice! and is working perfectly! | 22:15:01 |
2 Jun 2024 |
@tengkuizdihar:matrix.org | https://status.nixos.org/ and there's a link for nixpkgs-24.05-darwin | 05:27:03 |
| @bumperboat:matrix.org changed their display name from bumperboat (UTC+7) to bumperboat (UTC+1). | 05:28:57 |
Manu [tennox] | In reply to @thatoo:matrix.org Any idea how to solve this issue? I think in this case option c) is applicable. (from the build command output) | 07:05:28 |
Industrial | In reply to@tomberek:matrix.org https://status.nixos.org/ and https://channels.nixos.org/ thanks! | 16:04:48 |
| @aloisw:kde.org set a profile picture. | 18:01:48 |