!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

881 Members
177 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
22 Oct 2025
@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

Show newer messages


Back to Room ListRoom Version: 6