!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

830 Members
167 Servers

Load older messages


SenderMessageTime
22 Oct 2025
@gabyx:matrix.org@gabyx:matrix.org
In reply to @cortsf:matrix.org
ipsavitsky234: I just made a simple program and I'd like it to be available on nixpkgs, if possible.
* people can use your program also when its an output in a flake.nix, doesnt need to be in the nixpkgs repo…
11:08:20
@dramforever:matrix.orgdramforeverthis seems to be a haskell thing, which i'm not really familiar about so the specifics are beyond me11:09:03
@ipsavitsky234:matrix.orgipsavitsky234yeah, you can either keep it as a flake or if you want it in nixpkgs you can take a package definition and adapt it for nixpkgs. Check out docs/language-frameworks for a good quickstart on how to package certain languages11:09:12
@cortsf:matrix.orgcortsf @gabyx:matrix.org: I'm also trying to provide a nixos service using this program. 11:09:57
@gabyx:matrix.org@gabyx:matrix.org the question is what qualifies for nixpkgs ;)? stars? usage? etc i dont. 11:10:37
@cortsf:matrix.orgcortsfYes, I was looking to ask about that somewhere. 11:11:07
@dramforever:matrix.orgdramforevergenerally, usage11:12:23
@dramforever:matrix.orgdramforeverwe're not going to package something that's not popular among users because in nixos it is really easy to just use a package in your own nixos config11:13:09
@dramforever:matrix.orgdramforeverincluding nixos service11:13:12
@dramforever:matrix.orgdramforeverand by popular i mean, like, at least a few users right11:14:04
@dramforever:matrix.orgdramforeverif it's just your thing that you just made, nixpkgs is not the place to advertise it11:14:18
@cortsf:matrix.orgcortsfWell, I thought It might become useful to others. The alternatives on nixpkgs are a bit.. outdatedd or weird. This also being haskell is very easy to customize.11:15:36
@dramforever:matrix.orgdramforeverif you want to make it more easily available to other users, you can consider adding instructions in your readme file first11:15:43
@dramforever:matrix.orgdramforever so that's a problem, nixpkgs isn't really the place for software to become useful 11:16:40
@dramforever:matrix.orgdramforever * so that's a problem, nixpkgs isn't really the place for software to become useful to others 11:16:44
@cortsf:matrix.orgcortsfThanks. I'll just publish a config snippet.11:17:44
@dramforever:matrix.orgdramforeversince as mentioned, especially with flakes or something, we have the very viable alternative of users pulling your flake11:17:47
@dramforever:matrix.orgdramforeverinstead of having to go through nixpkgs11:17:59
@cortsf:matrix.orgcortsfIt's ok, I knew this was going to be likely the case. Thanks!11:18:22
@gabyx:matrix.org@gabyx:matrix.orgalso its good to see more nic adoption in other places ;)11:19:47
@gabyx:matrix.org@gabyx:matrix.orgif you go the nix flake way, once the stuff works and people find it useful you can still package to nixpkgs11:20:20
23 Oct 2025
@mrargoz:matrix.org@mrargoz:matrix.org joined the room.21:01:33
24 Oct 2025
@mrargoz:matrix.org@mrargoz:matrix.org left the room.04:39:39
@xengi42:matrix.org@xengi42:matrix.org left the room.19:34:21
25 Oct 2025
@byte-flavour:matrix.orgbyteflavour joined the room.21:48:44
26 Oct 2025
@acidbong:envs.net@acidbong:envs.net joined the room.07:14:09
@acidbong:envs.net@acidbong:envs.net moin. i'm trying to expose my NixOS' config.i18n.glibcLocales (for the sake of being built and cached by CI) in a flake-parts way, but there's a catch

here's what I define:
{lib,self,...}: {
  perSystem = {system, ...}: {
      packages = {
        glibcLocales-bong = lib.mkIf (
          self.nixosConfigurations.bong.config.nixpkgs.hostPlatform.system == system
        ) self.nixosConfigurations.bong.config.i18n.glibcLocales;
      };
  };
}
I expect it to generate this
{
  packages = {
    aarch64-linux = {
      ...
      dwm = ...;
      hacksaw = ...;
      ...
    };
    x86_64-linux = {
      ...
      dwm = ...;
      glibcLocales-bong = ...;
      hacksaw = ...;
      ...
    };
  };
}
but it does not: instead, when running nix flake show --all-systems, it still tries to evaluate it on a wrong system
$ nix flake show --all-systems
...
└───packages
    ├───aarch64-linux
    │   ├───desktop-scripts: package 'desktop-scripts'
    │   ├───dwm: package 'dwm-6.5'
       error: The option `perSystem.aarch64-linux.packages.glibcLocales-bong' was accessed but has no value defined. Try setting the option.
before submitting to flake.parts, I wanna make sure whether they misimplement this or i misunderstood Nixpkgs modules and lib.types.attrsOf in particular
07:16:41
@acidbong:envs.net@acidbong:envs.net turns out, a higher-level mkIf was the way, I did misunderstood [lazyA,a]ttrsOf 09:05:53
@sir-morton:matrix.orgSir_Morton joined the room.15:33:28
27 Oct 2025
@acidbong:envs.net@acidbong:envs.net left the room.09:20:03

Show newer messages


Back to Room ListRoom Version: 6