!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

877 Members
180 Servers

Load older messages


SenderMessageTime
18 Mar 2025
@laauurraa:matrix.orglaauurraa

Hi! I have a possibly kind of dumb question, but when I install something like Zotero via NixOS, I can just run it, right?
But when I do the same in a flake, like this for example:

{
  description = "zotero2remarkable bridge development tools";

  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};
        pythonEnv = pkgs.python312.withPackages (ps: []);
        environment = pkgs.mkShell {
          buildInputs = [
            pkgs.zotero
            pkgs.poetry
          ];
        };
      in {
        devShells.default = environment;
      }
    );
}

Then I need to install the dynamic libraries myself. I thought the entire idea of Nix was that nixpkgs knows what the dynamic libraries are for zotero and it figures it out for your system?

14:18:38
@elikoga:matrix.orgelikoga Works with github:NixOS/nixpkgs/nixos-24.11 this is unrelated to Flakes 14:29:02
@elikoga:matrix.orgelikogaShould be reported at https://github.com/NixOS/nixpkgs/issues as an issue with zotero on unstable14:29:53
@elikoga:matrix.orgelikoga* Should be reported at https://github.com/NixOS/nixpkgs/issues as an issue with the newest zotero version on unstable14:30:20
@laauurraa:matrix.orglaauurraaOh huh, you're right. On 24.11 it does launch (although I get a different bug). I didn't realize it was an issue with the zotero package itself14:30:42
@laauurraa:matrix.orglaauurraa

I'm getting a crash with 24.11 though :(

/nix/store/zhj8yr1ykkj7j266v4pcjxfna4qx55ga-zotero-7.0.10/bin/.zotero-wrapped: line 20: 48168 Segmentation fault      (core dumped) "$CALLDIR/zotero-bin" -app "$CALLDIR/app/application.ini" "$@"
14:31:10
@elikoga:matrix.orgelikogaCan you provide more details?14:32:01
@laauurraa:matrix.orglaauurraa

I'm running NixOS unstable myself. The only thing I changed in the flake was to pin to nixos-24.11 IE, my flake looks like this now:

{
  description = "zotero2remarkable bridge development tools";

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

  outputs = {self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
        pythonEnv = pkgs.python312.withPackages (ps: []);
        environment = pkgs.mkShell {
          buildInputs = [
            pkgs.zotero
            pkgs.poetry
            pythonEnv
          ];
        };
      in {
        devShells.default = environment;
      }
    );
}
14:32:47
@laauurraa:matrix.orglaauurraa I run nix develop then zotero 14:32:55
@laauurraa:matrix.orglaauurraaimage.png
Download image.png
14:33:08
@elikoga:matrix.orgelikoga

I'm running NixOS unstable myself

Why

14:33:33
@laauurraa:matrix.orglaauurraaUh, why not?14:33:48
@elikoga:matrix.orgelikoga.14:33:56
@elikoga:matrix.orgelikogaI would not recommend using the unstable branch unless you are testing the unstable branch or planning to fix it if something breaks on your system14:34:20
@laauurraa:matrix.orglaauurraaHmm, many people kept recommending to just use unstable rather than stable14:34:38
@laauurraa:matrix.orglaauurraaI'll switch to stable then, I mean..14:34:45
@elikoga:matrix.orgelikogaWho is many people?14:34:48
@laauurraa:matrix.orglaauurraaMakes more sense to me14:34:49
@laauurraa:matrix.orglaauurraaPeople on Reddit14:34:54
@laauurraa:matrix.orglaauurraabut I think this community is a bit more professional and technical14:35:02
@elikoga:matrix.orgelikogaWhile it can sometimes have advantages using packages from unstable or even master Don't do it if you don't know hot to handle it?14:35:23
@elikoga:matrix.orgelikoga* While it can sometimes have advantages using packages from unstable or even master Don't do it if you don't know how to handle it?14:35:30
@laauurraa:matrix.orglaauurraaEh, I would know how to workaround this issue, it's more just that I didn't expect it14:35:49
@laauurraa:matrix.orglaauurraaLike I said, I often doubt myself rather than the packages when it comes to Nix14:35:56
@elikoga:matrix.orgelikogaIn stable I'd agree, in unstable it's anyone's guess where problems usually are14:36:26
@laauurraa:matrix.orglaauurraaFair enough, that makes sense14:36:34
@laauurraa:matrix.orglaauurraaI'll downgrade to stable then, I can always specify that I want a specific package from unstable if it's important14:37:00
@elikoga:matrix.orgelikogaNevermind, it shouldn't: It's already reported https://github.com/NixOS/nixpkgs/issues/389978 And solved https://github.com/NixOS/nixpkgs/pull/390243 Which is already in master14:39:31
@laauurraa:matrix.orglaauurraaFair enough, thanks for your help14:40:40
@laauurraa:matrix.orglaauurraaI successfully downgraded to 24.11 stable :) Despite the weird edge cases sometimes, Nix really does have the amazing benefit of being incredibly easy to control15:41:07

Show newer messages


Back to Room ListRoom Version: 6