!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

236 Members
https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture53 Servers

Load older messages


SenderMessageTime
10 Aug 2022
@winterqt:nixos.devWinter (she/her)that's old!16:56:06
@nbp:mozilla.orgnbpI have been around for a long time, yes, and we still don't have good grafting solutions as of today.16:58:22
@kity:kity.wtfproblemshow does guix do it? iirc they have something equivalent16:58:46
@roberthensing:matrix.orgRobert Hensing (roberth)removing .override: https://github.com/nixpkgs-architecture/issues/issues/816:59:52
@roberthensing:matrix.orgRobert Hensing (roberth)basically moving the package function args into an attrset within the package definition17:00:27
@roberthensing:matrix.orgRobert Hensing (roberth) John Ericson: regarding splicing, is it just a matter of calling https://github.com/nixpkgs-architecture/issues/issues/8 with pkgs.splicedPackages for pkgs? 17:04:21
@nbp:mozilla.orgnbp
In reply to @kity:kity.wtf
how does guix do it? iirc they have something equivalent
Packagers are responsible for adding annotation manually for each packages, IIRC.
17:06:17
@nbp:mozilla.orgnbp
In reply to @kity:kity.wtf
how does guix do it? iirc they have something equivalent
* Packagers are responsible for adding annotation manually for each packages, IIRC (from multiples years ago))
17:06:30
@nbp:mozilla.orgnbp * Packagers are responsible for adding annotation manually for each packages, IIRC (from multiples years ago) 17:06:31
@roberthensing:matrix.orgRobert Hensing (roberth)
In reply to @roberthensing:matrix.org
John Ericson: regarding splicing, is it just a matter of calling https://github.com/nixpkgs-architecture/issues/issues/8 with pkgs.splicedPackages for pkgs?
I guess that if not, we can make deps special and treat it the same way we treat the callPackage arguments
17:08:00
@roberthensing:matrix.orgRobert Hensing (roberth)
In reply to @roberthensing:matrix.org
John Ericson: regarding splicing, is it just a matter of calling https://github.com/nixpkgs-architecture/issues/issues/8 with pkgs.splicedPackages for pkgs?
* I guess that if not, we can make deps special in mkDerivation and treat it the same way we treat the callPackage arguments
17:08:20
@nbp:mozilla.orgnbp Robert Hensing (roberth): in SOS, I had suggested to move it to each attribute, such that we can override the attribute set of dependencies using the update operator as well. 17:09:07
@nbp:mozilla.orgnbpthis definitely add more verbosity at the attribute level :/17:09:45
@roberthensing:matrix.orgRobert Hensing (roberth)you mean at the all-packages.nix level? My proposal removes that need17:10:17
@nbp:mozilla.orgnbp I mean { drvBuilder = stdenv.mkDerivation; deps = { pkgs1 = …; pkgs2 = …; }; installPhase = args: "${args.deps.pkgs1}/bin/foo --help"; … } 17:12:05
@roberthensing:matrix.orgRobert Hensing (roberth)I think we can pull a trick to rely on function argument reflection once more, as a convenience17:14:10
@nbp:mozilla.orgnbpfunction argument reflection is best of we avoid it.17:16:22
@roberthensing:matrix.orgRobert Hensing (roberth)
pkgFun: let
  args = functionArgs pkgFun;
  deps = do_the_callPacakge_thing args;
in pkgSelf: pkgFun ({ inherit deps } // pkgSelf;
17:16:50
@roberthensing:matrix.orgRobert Hensing (roberth)I agree that function reflection is to be avoided, but that's how you reduce the verbosity17:17:09
@nbp:mozilla.orgnbp Well we would no longer require callPackage function either. 17:17:10
@roberthensing:matrix.orgRobert Hensing (roberth)only for cross compilation splicing, but that could perhaps be solved differently17:17:48
@roberthensing:matrix.orgRobert Hensing (roberth) *
pkgFun: let
  args = functionArgs pkgFun;
  deps = do_the_callPacakge_thing args;
in pkgSelf: pkgFun ({ inherit deps } // pkgSelf)
17:19:00
@roberthensing:matrix.orgRobert Hensing (roberth) *
pkgFun: let
  args = functionArgs pkgFun;
  deps = do_the_callPacakge_thing args;
in pkgSelf: pkgFun deps ({ inherit deps } // pkgSelf)
17:19:27
@nbp:mozilla.orgnbp

myPkgs = import ./myPkgs self;

# myPkgs/default.nix
self:

{
  drvBuilder = stdenv.mkDerivation;
  deps = { inherit (self) pkgs1 pkgs2; };
  config = { doCheck = false; useGit = false; };
  …
}

callPackage is used today to provide arguments which are going to be used for various part, such as the stdenv or mkDerivation, the set of dependencies and the configuration flags. While it look nice, having a single overriding strategy which allow to either change the configuration, dependencies or builder the same way as the internals of the builder arguments is interesting too.

17:24:06
@qyliss:fairydust.spaceAlyssa RossI do like the idea of separating deps from builder arguments17:24:35
@qyliss:fairydust.spaceAlyssa RossAlthough if we're changing how deps work, I've always wondered about `nativeBuildInputs = pkgs: with pkgs; [ meson ]; buildInputs = pkgs: with pkgs; [ libwhatever ];'17:25:21
@qyliss:fairydust.spaceAlyssa RossThat way you don't need splicing17:25:33
@qyliss:fairydust.spaceAlyssa Ross And then outside those, you have to go through buildPackages / hostPackages / etc 17:25:46
@qyliss:fairydust.spaceAlyssa Rossnone of this the variable has a different value depending on where it's used effect you get with splicing17:26:08
@infinisil:matrix.orginfinisil(uploaded meeting notes to github: https://github.com/nixpkgs-architecture/meetings/blob/master/2022-08-10.md)17:32:41

There are no newer messages yet.


Back to Room ListRoom Version: 9