!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

854 Members
177 Servers

Load older messages


SenderMessageTime
20 Oct 2025
@tiferrei:tiferrei.comtiferrei changed their display name from Tiago Ferreira to tiferrei.17:34:14
21 Oct 2025
@alexeusgr:matrix.org50^2 changed their profile picture.04:51:46
@andrewzah:matrix.abare.partyAndrew Zah set a profile picture.09:49:41
@xx0a_q:matrix.org@xx0a_q:matrix.org joined the room.11:47:34
@xx0a_q:matrix.org@xx0a_q:matrix.org left the room.17:36:59
22 Oct 2025
@cortsf:matrix.orgcortsf joined the room.01:07:52
@cortsf:matrix.orgcortsf Hello. Can I have some help? I'm trying to publish a flake (using haskell.nix) into nixpkgs. Not sure if using builtins.getFlake is ok, since there is no derivation using it apparently. 01:09:25
@cortsf:matrix.orgcortsfhttps://github.com/cortsf/hympd01:09:47
@cortsf:matrix.orgcortsf

This seems to work locally.

{ pkgs ? import <nixpkgs> {} }:
let
  hympdFlake = builtins.getFlake "github:cortsf/hympd?rev=ea295556192e4c436917313da11211d8b1d47299";
  hympdPackage = hympdFlake.packages.${pkgs.system}.default;
in
pkgs.stdenv.mkDerivation {
  pname = "hympd";
  version = "1.0";
  src = ./.;
  buildInputs = [ hympdPackage ];
  # buildPhase = ''
  #   echo "Using my-package from the other flake: ${myPackage}/bin/some-command"
  # '';
  installPhase = ''
    mkdir -p $out/bin
    cp ${hympdPackage}/bin/hympd $out/bin
  '';
}

01:10:02
@cortsf:matrix.orgcortsf *

This seems to work locally.

{ pkgs ? import <nixpkgs> {} }:
let
  hympdFlake = builtins.getFlake "github:cortsf/hympd?rev=ea295556192e4c436917313da11211d8b1d47299";
  hympdPackage = hympdFlake.packages.${pkgs.system}.default;
in
pkgs.stdenv.mkDerivation {
  pname = "hympd";
  version = "1.0";
  src = ./.;
  buildInputs = [ hympdPackage ];
  installPhase = ''
    mkdir -p $out/bin
    cp ${hympdPackage}/bin/hympd $out/bin
  '';
}

01:13:55
@ipsavitsky234:matrix.orgipsavitsky234 cortsfnot sure what you mean by "publish a nix flake to nixpkgs", can you elaborate pls? 09:56:16
@cortsf:matrix.orgcortsf ipsavitsky234: I just made a simple program and I'd like it to be available on nixpkgs, if possible. 11:06:28
@dramforever:matrix.orgdramforever no, builtins.getFlake is not okay, nor is any other way to download external code during evaluation in nixpkgs 11:07:27
@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
11:08:02
@dramforever:matrix.orgdramforevergenerally you want to check how some similar thing is packaged in nixpkgs, and just copy what they do11:08:17
@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

Show newer messages


Back to Room ListRoom Version: 6