From e472635deb23096c11566d9db9bbf7f40e1b0386 Mon Sep 17 00:00:00 2001 From: Michael Brantley Date: Tue, 4 Jul 2023 12:01:01 +0100 Subject: [PATCH 01/15] chore: incorporating main branch tweaks to profile.d --- profile.d/0500_node.sh | 2 +- profile.d/0500_python3.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/profile.d/0500_node.sh b/profile.d/0500_node.sh index e37843f..3627443 100644 --- a/profile.d/0500_node.sh +++ b/profile.d/0500_node.sh @@ -5,7 +5,7 @@ # ---------------------------------------------------------------------------- # # Only run if `node' is in `PATH' -if command -v node >/dev/null; then +if node --version >/dev/null 2>/dev/null; then NODE_PATH="$FLOX_ENV/lib/node_modules${NODE_PATH:+:$NODE_PATH}"; export NODE_PATH; fi diff --git a/profile.d/0500_python3.sh b/profile.d/0500_python3.sh index 9fbbc8d..b1a8fab 100644 --- a/profile.d/0500_python3.sh +++ b/profile.d/0500_python3.sh @@ -5,7 +5,7 @@ # ---------------------------------------------------------------------------- # # Only run if `python3' is in `PATH' -if command -v python3 >/dev/null; then +if python3 --version >/dev/null 2>/dev/null; then # Get the major/minor version from `python3' to determine the correct path. _env_pypath="$FLOX_ENV/lib/python$( python3 -c 'import sys From d8488f7514e21291860fc521355c16e43ab571ae Mon Sep 17 00:00:00 2001 From: Michael Brantley Date: Tue, 4 Jul 2023 12:02:38 +0100 Subject: [PATCH 02/15] flakebump --- flake.lock | 207 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 120 insertions(+), 87 deletions(-) diff --git a/flake.lock b/flake.lock index c862f24..9d60c66 100644 --- a/flake.lock +++ b/flake.lock @@ -88,7 +88,7 @@ }, "capacitor_3": { "inputs": { - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { @@ -134,15 +134,15 @@ "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1686621798, - "narHash": "sha256-FUwWszmSiDzUdTk8f69xwMoYlhdPaLvDaIYOE/y6VXc=", + "lastModified": 1687310026, + "narHash": "sha256-20RHFbrnC+hsG4Hyeg/58LvQAK7JWfFItTPFAFamu8E=", "owner": "ipetkov", "repo": "crane", - "rev": "75f7d715f8088f741be9981405f6444e2d49efdd", + "rev": "116b32c30b5ff28e49f4fcbeeb1bbe3544593204", "type": "github" }, "original": { @@ -155,7 +155,7 @@ "inputs": { "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -172,6 +172,24 @@ "type": "github" } }, + "etc-profiles": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1688164448, + "narHash": "sha256-ds7oVoW7StxSY2pXXyaAESltjnKshk3YmFUlqlGkQ6s=", + "owner": "flox", + "repo": "etc-profiles", + "rev": "c25be86a0a44a5413af911d7f15a6405f21738c2", + "type": "github" + }, + "original": { + "owner": "flox", + "repo": "etc-profiles", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -310,7 +328,7 @@ }, "floco": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1684245865, @@ -329,7 +347,7 @@ }, "floco_2": { "inputs": { - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1684245865, @@ -356,11 +374,11 @@ "shellHooks": "shellHooks" }, "locked": { - "lastModified": 1686824858, - "narHash": "sha256-29En5YzPyNPTuKbEbc/19R0TjwyS+ZiD+xob+dCocOk=", + "lastModified": 1688045212, + "narHash": "sha256-xgSGJCp0aQrEeaFMAmNnkW6YG49/HnvULIhN5Keyw9M=", "ref": "latest", - "rev": "1ab9bb637a4871c9a8cf9ceaefa1f5b9d8bc8234", - "revCount": 519, + "rev": "f19cb5f907f077d4ebe54a497c9f20b90586f0da", + "revCount": 530, "type": "git", "url": "ssh://git@github.com/flox/flox" }, @@ -374,16 +392,17 @@ "inputs": { "builtfilter": "builtfilter", "capacitor": "capacitor", + "etc-profiles": "etc-profiles", "flox": "flox", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "tracelinks": "tracelinks" }, "locked": { - "lastModified": 1686837422, - "narHash": "sha256-0TEROGrrjVs1zuQ5+7dxHCiThrzhZvg59rzLFjdmIkk=", + "lastModified": 1688445262, + "narHash": "sha256-uX28KY48ZyTczzzvEWnw0eTJqveIYHMbfVZvfrRjQVc=", "owner": "flox", "repo": "floxpkgs", - "rev": "58eae1f5e90cd4ce790502ee4b13cddb4f49597f", + "rev": "9b6c0b0397d2e692a7d5f205780b8c244131e4cf", "type": "github" }, "original": { @@ -397,7 +416,7 @@ "builtfilter": "builtfilter_2", "capacitor": "capacitor_3", "flox": "flox_2", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_12", "tracelinks": "tracelinks_2" }, "locked": { @@ -491,11 +510,11 @@ "flox-floxpkgs": "flox-floxpkgs_2" }, "locked": { - "lastModified": 1686896430, - "narHash": "sha256-VA9ywbsxHU1vbaTNmVuXaS4Rj2hPCJw9cCpuBVZb97Q=", + "lastModified": 1688420709, + "narHash": "sha256-+9MnUn7tY+gj6/jKiuIA0Sdfibv14Mei42Z60ErV+Qk=", "ref": "refs/heads/main", - "rev": "211c74dead2d2f0aff39f46f02d93806630c8fdd", - "revCount": 10, + "rev": "7339fc72969af40cd8dc64184c3a0a335ec5fa3d", + "revCount": 4, "type": "git", "url": "ssh://git@github.com/flox/ld-floxlib" }, @@ -506,11 +525,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1684754342, - "narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=", + "lastModified": 1687661089, + "narHash": "sha256-RhF9PiNfOQpm/Q2BR+2305KDR9FCXD6QJizbZ5vxVvQ=", "owner": "flox", "repo": "nixpkgs", - "rev": "7084250df3d7f9735087d3234407f3c1fc2400e3", + "rev": "f742512ccc99e6ac457d6d4ddce78f283c4bbfde", "type": "github" }, "original": { @@ -522,11 +541,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1686445117, - "narHash": "sha256-QfbAtKFmh92rv0j1e9d7EDgPLDERn1EY6FGXwKG09SM=", + "lastModified": 1688259758, + "narHash": "sha256-CYVbYQfIm3vwciCf6CCYE+WOOLE3vcfxfEfNHIfKUJQ=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "a08e40a9bc625b7ee428bd7b64cdcff516023c5d", + "rev": "a92befce80a487380ea5e92ae515fe33cebd3ac6", "type": "github" }, "original": { @@ -537,11 +556,11 @@ }, "nixpkgs-lib_2": { "locked": { - "lastModified": 1686445117, - "narHash": "sha256-QfbAtKFmh92rv0j1e9d7EDgPLDERn1EY6FGXwKG09SM=", + "lastModified": 1688259758, + "narHash": "sha256-CYVbYQfIm3vwciCf6CCYE+WOOLE3vcfxfEfNHIfKUJQ=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "a08e40a9bc625b7ee428bd7b64cdcff516023c5d", + "rev": "a92befce80a487380ea5e92ae515fe33cebd3ac6", "type": "github" }, "original": { @@ -598,11 +617,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1684754342, - "narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=", + "lastModified": 1687661089, + "narHash": "sha256-RhF9PiNfOQpm/Q2BR+2305KDR9FCXD6QJizbZ5vxVvQ=", "owner": "flox", "repo": "nixpkgs", - "rev": "7084250df3d7f9735087d3234407f3c1fc2400e3", + "rev": "f742512ccc99e6ac457d6d4ddce78f283c4bbfde", "type": "github" }, "original": { @@ -646,11 +665,11 @@ }, "nixpkgs-staging": { "locked": { - "lastModified": 1684754342, - "narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=", + "lastModified": 1687807295, + "narHash": "sha256-7TUD0p0m4mZpIi1O+Cyk5NCqpJUnhv/CJOAuHOndjao=", "owner": "flox", "repo": "nixpkgs", - "rev": "7084250df3d7f9735087d3234407f3c1fc2400e3", + "rev": "6b3d1b1cf13f407fef5e634b224d575eb7211975", "type": "github" }, "original": { @@ -678,11 +697,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1684754342, - "narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=", + "lastModified": 1688231357, + "narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=", "owner": "flox", "repo": "nixpkgs", - "rev": "7084250df3d7f9735087d3234407f3c1fc2400e3", + "rev": "645ff62e09d294a30de823cb568e9c6d68e92606", "type": "github" }, "original": { @@ -709,6 +728,20 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1674236650, + "narHash": "sha256-B4GKL1YdJnII6DQNNJ4wDW1ySJVx2suB1h/v4Ql8J0Q=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cfb43ad7b941d9c3606fb35d91228da7ebddbfc5", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_11": { "locked": { "lastModified": 1685866647, "narHash": "sha256-4jKguNHY/edLYImB+uL8jKPL/vpfOvMmSlLAGfxSrnY=", @@ -724,7 +757,7 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_12": { "inputs": { "capacitor": "capacitor_4", "flox": [ @@ -766,6 +799,20 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1687977148, + "narHash": "sha256-gUcXiU2GgjYIc65GOIemdBJZ+lkQxuyIh7OkR9j0gCo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "60a783e00517fce85c42c8c53fe0ed05ded5b2a4", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1685714850, "narHash": "sha256-OcvbIJq4CGwwFr9m7M/SQcDPZ64hhR4t77oZgEeh7ZY=", @@ -781,7 +828,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1674236650, "narHash": "sha256-B4GKL1YdJnII6DQNNJ4wDW1ySJVx2suB1h/v4Ql8J0Q=", @@ -795,7 +842,7 @@ "type": "indirect" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1685866647, "narHash": "sha256-4jKguNHY/edLYImB+uL8jKPL/vpfOvMmSlLAGfxSrnY=", @@ -811,7 +858,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "inputs": { "capacitor": "capacitor_2", "flox": [ @@ -821,7 +868,7 @@ "flox-floxpkgs": [ "flox-floxpkgs" ], - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-staging": "nixpkgs-staging", "nixpkgs-unstable": "nixpkgs-unstable", @@ -832,11 +879,11 @@ "nixpkgs__flox__x86_64-linux": "nixpkgs__flox__x86_64-linux" }, "locked": { - "lastModified": 1686770319, - "narHash": "sha256-9ffqbrKUa0g2aql8B8SDXTCDzyU8PnW7JI1uisuk0dQ=", + "lastModified": 1688442813, + "narHash": "sha256-sLQ9/OOgS464JfXHDGn38LNnMqydN19ga3B/zXQGw7E=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "48e8d0cfdc7bc98e9bf4d65a67ea324b3d952ea7", + "rev": "f04b9c97d95664812b3bc100e4d4882edd022ab6", "type": "github" }, "original": { @@ -845,13 +892,13 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { - "lastModified": 1684754342, - "narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=", + "lastModified": 1687661089, + "narHash": "sha256-RhF9PiNfOQpm/Q2BR+2305KDR9FCXD6QJizbZ5vxVvQ=", "owner": "flox", "repo": "nixpkgs", - "rev": "7084250df3d7f9735087d3234407f3c1fc2400e3", + "rev": "f742512ccc99e6ac457d6d4ddce78f283c4bbfde", "type": "github" }, "original": { @@ -859,7 +906,7 @@ "type": "indirect" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1684754342, "narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=", @@ -875,7 +922,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1685714850, "narHash": "sha256-OcvbIJq4CGwwFr9m7M/SQcDPZ64hhR4t77oZgEeh7ZY=", @@ -891,29 +938,15 @@ "type": "github" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1674236650, - "narHash": "sha256-B4GKL1YdJnII6DQNNJ4wDW1ySJVx2suB1h/v4Ql8J0Q=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "cfb43ad7b941d9c3606fb35d91228da7ebddbfc5", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, "nixpkgs__flox__aarch64-darwin": { "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1686769905, - "narHash": "sha256-3bTAKno+hbVkaj/7nIuG8CgBuS347E6ksPcwwjcMw78=", + "lastModified": 1688442698, + "narHash": "sha256-XOQ5euPwDi4Z5sK1IH8Oukp/dftCAPxjfSp7/z2yYOc=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "7800311cb0d5c8970021f9f6691115feb0be7c04", + "rev": "974acdaffbc02e7362ca09eb45e408353e4700f4", "type": "github" }, "original": { @@ -947,11 +980,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1686769880, - "narHash": "sha256-t5LMiPoNgzB6UKBvUzMlsC3vcYvKoWT6InPHpTf6QNo=", + "lastModified": 1688414073, + "narHash": "sha256-PNERhrx0JpjijMScn9O1q+VZnyplbD72pi/47fuPUTI=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "234e8b5adf58fe3b1b6a33680f0a6ba8d8b639d0", + "rev": "54cd1273a4da56e9d471e3bc2884983d1623e60e", "type": "github" }, "original": { @@ -985,11 +1018,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1686770241, - "narHash": "sha256-2EJ6vCG+iMklp4mcUGhZPJk7brx2fHn2fHUYKjtJI34=", + "lastModified": 1688414430, + "narHash": "sha256-Uvd6ljDqNCkDPUStRVptnquGuKkQilM8NF7vPD8hnv8=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "cd8107202cd66d4047d2f1decb29cf03ad6195cd", + "rev": "0e79bbbd770ff7af93bc11fd498be2ab345e4f19", "type": "github" }, "original": { @@ -1023,11 +1056,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1686770232, - "narHash": "sha256-DFuwK3Vul8z9va99vpcWmz32WBv4Hd5tIT/qWdkG/bo=", + "lastModified": 1688414420, + "narHash": "sha256-gd7gHHG0cAtbc956rnfwVH6czsT1fDI29oEn4mk0J1o=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "21a6177aae1307aaabc94cacff8f729495fa9df0", + "rev": "ff0e094fcaaafcc10178bb9f62ed113ff646e45c", "type": "github" }, "original": { @@ -1061,11 +1094,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1686770212, - "narHash": "sha256-Nf8RF6JYjlw65DvBQfkEz2Ev6UFyCM38oPJEIXKNfXc=", + "lastModified": 1688414398, + "narHash": "sha256-1bmG2iTPf7T06AVNvJvwFfMbTdD4qJjlMfLC6zYkJmI=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "209643b52be208bca6eae3a8df22a2e9ea8c175f", + "rev": "fef6adcaefa98ecc8cfcb9ea0c0ee9a66c613922", "type": "github" }, "original": { @@ -1166,15 +1199,15 @@ "flake-compat": "flake-compat_2", "flake-utils": "flake-utils_2", "gitignore": "gitignore", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1686668298, - "narHash": "sha256-AADh9NqHh6X2LOem4BvI7oCkMm+JPCSCE7iIw5nn0VA=", + "lastModified": 1687779420, + "narHash": "sha256-noueZE/Z5qx6NF/grg46qlpZ/1nuPpc92RvqgCmRaLI=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "5b6b54d3f722aa95cbf4ddbe35390a0af8c0015a", + "rev": "1fa438eee82f35bdd4bc30a9aacd7648d757b388", "type": "github" }, "original": { @@ -1188,7 +1221,7 @@ "flake-compat": "flake-compat_4", "flake-utils": "flake-utils_4", "gitignore": "gitignore_2", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_11", "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { From d212425aa6e783127cd001378704afc7eae194ef Mon Sep 17 00:00:00 2001 From: Michael Brantley Date: Wed, 5 Jul 2023 18:12:35 +0100 Subject: [PATCH 03/15] chore: incorporating main branch tweaks to pkgs/* --- pkgs/etc-profiles/base.nix | 70 ------------------- pkgs/etc-profiles/default.nix | 83 +++++++---------------- pkgs/etc-profiles/mk-profile.nix | 56 ---------------- pkgs/etc-profiles/pkg-fun.nix | 111 +++++++++++++++++++++++++++++++ 4 files changed, 134 insertions(+), 186 deletions(-) delete mode 100644 pkgs/etc-profiles/base.nix delete mode 100644 pkgs/etc-profiles/mk-profile.nix create mode 100644 pkgs/etc-profiles/pkg-fun.nix diff --git a/pkgs/etc-profiles/base.nix b/pkgs/etc-profiles/base.nix deleted file mode 100644 index cc1d371..0000000 --- a/pkgs/etc-profiles/base.nix +++ /dev/null @@ -1,70 +0,0 @@ -# ============================================================================ # -# -# Creates a starter `/etc/profile' that aggregates -# `/etc/profile.d/*.sh' "child scripts". -# -# ---------------------------------------------------------------------------- # - -{ self, version, bash, coreutils, hostPlatform, ld-floxlib, lib, system }: let - pname = "profile-base"; -in ( derivation { - inherit system pname version; - name = pname + "-" + version; - builder = bash.outPath + "/bin/bash"; - PATH = coreutils.outPath + "/bin"; - args = ["-eu" "-o" "pipefail" "-c" ('' - mkdir -p "$out/etc" "$out/lib"; - cp -- ${self}/profile "$out/etc/profile"; - '' + lib.optionalString hostPlatform.isLinux '' - for i in ${ld-floxlib}/lib/*; do - ln -s "$i" "$out/lib/$(basename $i)"; - done - '')]; - preferLocalBuild = true; - allowSubstitutes = system == ( builtins.currentSystem or null ); -} ) // { - meta.description = - "An `/etc/profile' script to source `/etc/profile.d/*.sh`"; - meta.longDescription = '' - An `/etc/profile' script to source `/etc/profile.d/*.sh` - - Users can define and install scripts in `/etc/profile.d' as - "custom packages"/installables to share common setup processes - across environments. - - Recommended usage: - # flox.nix - { - packages.nixpkgs-flox.sqlite = { - meta.outputsToInstall = ["bin" "out" "dev"]; - }; - - # Provides developer environment hooks for use with python3. - packages.flox.etc-profiles = { - # Optionally, specify language packages to install. - # Invoke `flox search -c flox etc-profiles -l` to see - # a list of all supported language pack outputs. Please - # note that all/most language packs depend on including - # the "common_paths" output. - meta.outputsToInstall = [ "base" "common_paths" "python3" ]; - }; - - shell.hook = '${""}' - [[ -r "$FLOX_ENV/etc/profile" ]] && . "$FLOX_ENV/etc/profile"; - pkg-config --list-all >&2; - '${""}' - } - ''; - meta.outputsToInstall = ["out"]; - meta.platforms = [ - "x86_64-linux" "aarch64-linux" "i686-linux" - "x86_64-darwin" "aarch64-darwin" - ]; -} - - -# ---------------------------------------------------------------------------- # -# -# -# -# ============================================================================ # diff --git a/pkgs/etc-profiles/default.nix b/pkgs/etc-profiles/default.nix index 8cf064a..dba5ebc 100644 --- a/pkgs/etc-profiles/default.nix +++ b/pkgs/etc-profiles/default.nix @@ -1,63 +1,26 @@ -{ self, inputs, lib, buildEnv, runCommand, bash, coreutils, hostPlatform, system }: - - -let - pname = "etc-profiles"; - version = "0.1.0-${lib.flox-floxpkgs.getRev self}"; - src = self; +# ============================================================================ # +# +# Creates a starter `/etc/profile' that aggregates +# `/etc/profile.d/*.sh' "child scripts". +# +# ---------------------------------------------------------------------------- # + +{ inputs +, lib +, config +, bash +, coreutils +, hostPlatform +, system +}: import ./pkg-fun.nix { + inherit lib config bash coreutils hostPlatform system; + src = inputs.self; ld-floxlib = inputs.ld-floxlib.packages.ld-floxlib; +} - splitSname = script: let - sname = baseNameOf script; - m = builtins.match "([^_]*)_(.*).sh" sname; - bname = builtins.elemAt m 1; - in { - inherit sname bname; - priority = builtins.head m; - pname = "profile-" + bname; - }; - - base = import ./base.nix { - inherit self version bash coreutils hostPlatform ld-floxlib lib system; - }; - - mkEtcProfile = import ./mk-profile.nix { - inherit bash coreutils system; - version = base.version; - }; - - mkProfileLocal = { - script - , description ? null - , longDescription ? null - , ... - } @ args: let - ss = splitSname script; - in { - name = lib.replaceStrings ["-"] ["_"] ss.bname; - value = lib.makeOverridable mkEtcProfile ( - ( removeAttrs ss ["bname"] ) // args - ); - }; - - profiles = builtins.listToAttrs ( map mkProfileLocal [ - { script = src + "/profile.d/0100_common-paths.sh"; } - { script = src + "/profile.d/0500_node.sh"; } - { script = src + "/profile.d/0500_python3.sh"; } - ] ); - - etcProfiles = buildEnv { - name = pname + "-" + version; - paths = [ base ] ++ (builtins.attrValues profiles); - }; -in runCommand "etc-profiles.${version}" { - inherit pname version; - outputs = [ "out" "base" ] ++ (builtins.attrNames profiles); - meta.description = "Installable /etc/profile.d activation scripts for use with flox"; -} '' - cp -R -- ${etcProfiles}/. $out - cp -R -- ${base}/. $base - ${lib.concatStringsSep "\n" (lib.mapAttrsToList (output: outpath: - "cp -R -- ${outpath}/. \$${output}") profiles)} -'' +# ---------------------------------------------------------------------------- # +# +# +# +# ============================================================================ # diff --git a/pkgs/etc-profiles/mk-profile.nix b/pkgs/etc-profiles/mk-profile.nix deleted file mode 100644 index 658513d..0000000 --- a/pkgs/etc-profiles/mk-profile.nix +++ /dev/null @@ -1,56 +0,0 @@ -# ============================================================================ # -# -# Creates a `/etc/profile.d/*.sh' script as an installable. -# -# ---------------------------------------------------------------------------- # - -let - prioToPrefix = p: let - pi = if builtins.isString p then builtins.fromJSON p else p; - ps = if builtins.isString p then p else toString p; - in if p == null then "" else - if pi < 1000 then "000" + ps + "_" else - if pi < 100 then "00" + ps + "_" else - if pi < 10 then "0" + ps + "_" else - ps + "_"; - npp = p: let - m = builtins.match "profile-(.*)" p; - in if m == null then p else builtins.head m; -in -{ version, bash, coreutils, system }: -{ script -, pname -, priority ? null # Integer 0-9999 or `null' -, sname ? ( prioToPrefix priority ) + ( npp pname ) -, description ? "An `/etc/profile.d/*.sh` script managing ${npp pname}." -, longDescription ? description -, platforms ? [ - "x86_64-linux" "aarch64-linux" "i686-linux" - "x86_64-darwin" "aarch64-darwin" - ] -}: ( derivation { - inherit system pname script sname; - name = pname + "-" + version; - builder = bash.outPath + "/bin/bash"; - PATH = coreutils.outPath + "/bin"; - args = let - profile_d = builtins.path { path = ./profile.d; }; - in ["-eu" "-o" "pipefail" "-c" '' - mkdir -p "$out/etc/profile.d"; - cp -- "$script" "$out/etc/profile.d/$sname"; - '']; - preferLocalBuild = true; - allowSubstitutes = system == ( builtins.currentSystem or null ); -} ) // { - meta = { - inherit description longDescription platforms; - outputsToInstall = ["out"]; - }; -} - - -# ---------------------------------------------------------------------------- # -# -# -# -# ============================================================================ # diff --git a/pkgs/etc-profiles/pkg-fun.nix b/pkgs/etc-profiles/pkg-fun.nix new file mode 100644 index 0000000..9ad6037 --- /dev/null +++ b/pkgs/etc-profiles/pkg-fun.nix @@ -0,0 +1,111 @@ +# ============================================================================ # +# +# Creates a starter `/etc/profile' that aggregates +# `/etc/profile.d/*.sh' "child scripts". +# +# ---------------------------------------------------------------------------- # + +{ src +, lib +, ld-floxlib +, config +, bash +, coreutils +, hostPlatform +, system +}: let + +# ---------------------------------------------------------------------------- # + + pname = "etc-profiles"; + version = "0.1.0"; + ldFloxlib = ld-floxlib; # XXX comment this avoids unnecessary copy of pkg + drv = derivation { + inherit pname version system ldFloxlib; + name = pname + "-" + version; + builder = bash.outPath + "/bin/bash"; + outputs = ["common_paths" "node" "python3" "out"]; + profile = builtins.path { path = ( toString src ) + "/profile"; }; + profile_d = builtins.path { path = ( toString src ) + "/profile.d"; }; + PATH = coreutils.outPath + "/bin"; + args = ["-eu" "-o" "pipefail" "-c" '' + mkdir -p "$out/etc" \ + "$out/lib" \ + "$common_paths/etc/profile.d" \ + "$node/etc/profile.d" \ + "$python3/etc/profile.d" \ + ; + cp -- "$profile" "$out/etc/profile"; + cp -- "$profile_d/0100_common-paths.sh" "$common_paths/etc/profile.d/"; + cp -- "$profile_d/0500_node.sh" "$node/etc/profile.d/"; + cp -- "$profile_d/0500_python3.sh" "$python3/etc/profile.d/"; + ${if ! hostPlatform.isLinux then "" else '' + ln -s -- "$ldFloxlib/lib/"* "$out/lib/"; + '' + } + '']; + }; + + +# --------------------------------------------------------------------------- # + +in drv // { + meta = let + lfm = ldFloxlib.meta or {}; + license = lib.licenses.mit; + # Inherit broken from `ld-floxlib' + broken = if hostPlatform.isLinux then ( lfm.broken or false ) else false; + platforms = [ + "x86_64-linux" "aarch64-linux" "i686-linux" + "x86_64-darwin" "aarch64-darwin" + ]; + unsupported = ! ( builtins.elem hostPlatform.system platforms ); + unfree = ! license.free; + in { + inherit (drv) name; + inherit license broken platforms unfree unsupported; + available = ( config.allowBroken || ( ! broken ) ) && + ( config.allowUnfree || ( ! unfree ) ) && + ( config.allowUnsupportedSystem || ( ! unsupported ) ); + homepage = "https://github.com/flox/etc-profiles"; + outputsToInstall = ["common_paths" "python3" "node" "out"]; + description = '' + Installable /etc/profile.d activation scripts for use with flox + ''; + longDescription = '' + An `/etc/profile' script to source `/etc/profile.d/*.sh` + + Users can define and install scripts in `/etc/profile.d' as + "custom packages"/installables to share common setup processes + across environments. + + Recommended usage: + # flox.nix + { + packages.nixpkgs-flox.sqlite = { + meta.outputsToInstall = ["bin" "out" "dev"]; + }; + + # Provides developer environment hooks for use with python3. + packages.flox.etc-profiles = { + # Optionally, specify language packages to install. + # Please note that all/most language packs depend on including + # the "common_paths" output, and ALL depend on "out". + meta.outputsToInstall = ["out" "common_paths" "python3"]; + }; + + shell.hook = '${""}' + [[ -r "$FLOX_ENV/etc/profile" ]] && . "$FLOX_ENV/etc/profile"; + pkg-config --list-all >&2; + '${""}' + } + ''; + }; +} + + +# ---------------------------------------------------------------------------- # +# +# +# +# ============================================================================ # From afb616133fc5c408819e98a43be150ac326bcdfd Mon Sep 17 00:00:00 2001 From: Michael Brantley Date: Wed, 5 Jul 2023 19:01:10 +0100 Subject: [PATCH 04/15] chore: incorporating main branch tweaks to .github/workflows --- .github/workflows/compare-nix.yml | 40 ++++++++-------- .github/workflows/trivial-test.yml | 76 ++++++++++-------------------- 2 files changed, 47 insertions(+), 69 deletions(-) diff --git a/.github/workflows/compare-nix.yml b/.github/workflows/compare-nix.yml index 70df69a..87e38c4 100644 --- a/.github/workflows/compare-nix.yml +++ b/.github/workflows/compare-nix.yml @@ -16,19 +16,20 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - tests: + tests-nix: runs-on: ubuntu-latest steps: - name: Install Nix - uses: cachix/install-nix-action@11f4ad19be46fd34c005a2864996d8f197fb51c6 + uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac with: - install_url: https://releases.nixos.org/nix/nix-2.13.3/install - nix_path: nixpkgs=channel:nixpkgs-22.11 + install_url: https://releases.nixos.org/nix/nix-2.15.1/install + nix_path: nixpkgs=channel:nixpkgs-23.05 extra_nix_config: | - experimental-features = nix-command flakes + experimental-features = nix-command flakes ca-derivations impure-derivations fetch-closure access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} substituters = https://cache.nixos.org - trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= + trusted-substituters = https://cache.floxdev.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= flox-store-public-0:8c/B+kjIaQ+BloCmNkRUKwaVPFWkriSAd0JJvuDu4F0= max-jobs = auto cores = 0 substitute = true @@ -37,40 +38,41 @@ jobs: connect-timeout = 5 stalled-download-timeout = 90 timeout = 0 + allow-import-from-derivation = true - name: Setup Nix Registry run: | set -eu; set -o pipefail; - nix registry pin nixpkgs github:NixOS/nixpkgs/22.11; + nix registry pin nixpkgs github:NixOS/nixpkgs/23.05; - - name: SQLite3 pkg-config Test + - name: KRB5 pkg-config Test shell: bash + env: + REPO: ${{ github.repository }} run: | set -eu; set -o pipefail; - _ec=0; - trap '_ec="$?"; echo "ERROR: code $_ec" >&2; exit "$_ec";' HUP TERM INT; if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then - selfURI="github:${{ github.repository }}"; + selfURI="github:$REPO"; else - selfURI="github:${{ github.repository }}/$GITHUB_REF"; + selfURI="github:$REPO/$GITHUB_REF"; fi echo "selfURI: $selfURI" >&2; echo "Installing deps" >&2; - nix profile install \ - 'nixpkgs#sqlite^bin,out,dev' \ - 'nixpkgs#pkg-config' \ - "$selfURI#etc-profiles" \ - ; + nix profile install 'nixpkgs#krb5^out,dev' -L; + nix profile install 'nixpkgs#pkg-config' -L; + nix profile install "$selfURI#etc-profiles" -L; + echo "Activating env" >&2; export FLOX_ENV="$HOME/.nix-profile"; + export LD_FLOXLIB_DEBUG=1; . "$FLOX_ENV/etc/profile"; - echo "Checking if pkg-config can find sqlite" >&2; - if pkg-config --list-all|grep '^sqlite3'; + echo "Checking if pkg-config can find KRB5" >&2; + if pkg-config --list-all|grep -i 'krb5'; then echo "PASS" >&2; exit 0; diff --git a/.github/workflows/trivial-test.yml b/.github/workflows/trivial-test.yml index f77ed6e..b549e7c 100644 --- a/.github/workflows/trivial-test.yml +++ b/.github/workflows/trivial-test.yml @@ -16,19 +16,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - tests: + tests-flox: runs-on: ubuntu-latest steps: - name: Install flox uses: flox/install-flox-action@v1.0.0 - - name: Setup Nix Registry - shell: bash - run: | - set -eu; - set -o pipefail; - nix registry pin nixpkgs github:NixOS/nixpkgs/22.11; - flox nix registry pin nixpkgs github:NixOS/nixpkgs/22.11; + - name: Checkout + uses: actions/checkout@v3 - name: Make Injector shell: bash @@ -40,33 +35,33 @@ jobs: cat "$PWD/flox.nix" > "$1";' > ./bin/flox-inject; chmod +x ./bin/flox-inject; - - name: SQLite3 pkg-config Test + - name: KRB5 pkg-config Test shell: bash + env: + REPO: ${{ github.repository }} run: | set -eu; set -o pipefail; - _ec=0; - trap '_ec="$?"; echo "ERROR: code $_ec" >&2; exit "$_ec";' HUP TERM INT; - echo "Creating sqlite-dev" >&2; - flox create -e sqlite-dev; + if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then + selfURI="github:$REPO"; + else + selfURI="github:$REPO/$GITHUB_REF"; + fi + echo "selfURI: $selfURI" >&2; - trap ' - _ec="$?"; - echo "ERROR: code $_ec" >&2; - flox destroy -e sqlite-dev; - exit "$_ec"; - ' HUP TERM INT; - trap '_ec="$?"; flox destroy -e sqlite-dev; exit "$_ec";' EXIT; + echo "Creating krb5-dev" >&2; + flox create -e krb5-dev; echo "Creating flox.nix" >&2; - cat <<'EOF' > ./flox.nix + cat < ./flox.nix { - packages.nixpkgs-flox.sqlite = { - meta.outputsToInstall = ["bin" "out" "dev"]; + packages.nixpkgs-flox.krb5 = { + meta.outputsToInstall = ["out" "dev"]; }; + packages."$selfURI".etc-profiles = {}; shell.hook = '' - [[ -r "$FLOX_ENV/etc/profile" ]] && . "$FLOX_ENV/etc/profile"; + [[ -r "\$FLOX_ENV/etc/profile" ]] && . "\$FLOX_ENV/etc/profile"; ''; } EOF @@ -77,37 +72,18 @@ jobs: echo "---" >&2; echo "Inject flox.nix" >&2; - EDITOR="$PWD/bin/flox-inject" flox edit -e sqlite-dev; + EDITOR="$PWD/bin/flox-inject" flox edit -e krb5-dev; rm -f ./flox.nix; echo "Installing deps" >&2; - flox install -e sqlite-dev pkg-config; - - if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then - selfURI="github:${{ github.repository }}"; - else - selfURI="github:${{ github.repository }}/$GITHUB_REF"; - fi - echo "selfURI: $selfURI" >&2; - echo "Installing locally defined deps" >&2; - flox install -e sqlite-dev "$selfURI#etc-profiles"; + flox install -e krb5-dev pkg-config; - # Have to work around a bunch of unset variables that get us killed - # when `set -eu; set -o pipefail;' is active. - export PS0=; - export PS1='\s-\v$ '; - export PS2='> '; - export PS3='>'; - export PS4='+'; - export FLOX_SAVE_PS1=; - ansifilter() { cat -; } - export -f ansifilter; - export _ansifilter=ansifilter; + runEnv() { flox activate -e krb5-dev -- "$@"; } echo "Activating env" >&2; - . <( flox activate -e sqlite-dev; ); + runEnv true; - echo "Checking if pkg-config can find sqlite" >&2; - if pkg-config --list-all|grep '^sqlite3'; + echo "Checking if pkg-config can find KRB5" >&2; + if runEnv pkg-config --list-all|grep -i 'krb5'; then echo "PASS" >&2; exit 0; @@ -115,7 +91,7 @@ jobs: echo "FAIL" >&2; echo "pkg-config --list results:" >&2; echo "---" >&2; - pkg-config --list-all >&2; + runEnv pkg-config --list-all >&2; echo "---" >&2; exit 1; fi From 24dd7a563097369d868ab69273f8777842c8d6c1 Mon Sep 17 00:00:00 2001 From: Michael Brantley Date: Wed, 5 Jul 2023 19:02:09 +0100 Subject: [PATCH 05/15] chore: incorporating remaining misc main branch tweaks --- .gitignore | 2 ++ README.org | 11 +---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 4a4b1d0..9d78e63 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /.flox +result +result-* diff --git a/README.org b/README.org index 529c178..ca65187 100644 --- a/README.org +++ b/README.org @@ -15,9 +15,7 @@ Recommended usage: }; packages.nixpkgs-flox.pkg-config = {}; # Provides `/etc/profile' base. - packages."github:flox/etc-profiles".profile-base = {}; - # Adds `0100_common-paths.sh' to `/etc/profile.d/'. - packages."github:flox/etc-profiles".profile-common-paths = {}; + packages."github:flox/etc-profiles".etc-profiles = {}; shell.hook = '' [[ -r "$FLOX_ENV/etc/profile" ]] && . "$FLOX_ENV/etc/profile"; @@ -40,10 +38,3 @@ Recommended usage: - [[file:./profile.d/0500_node.sh][profile-node]] sets =NODE_PATH=. + Only runs if =node= is in =PATH=, so it is a sane member of a robust =profile.d= collection. - - -* Environment Variables -- flox uses the ~LD_AUDIT~ environment variable as the mechanism - for loading shared libraries from the flox environment. - Define ~LD_FLOXLIB_AUDIT_IMPURE=1~ to view the substitutions - taking place. From f11a52a42c94593dc6372ee96133744a239577e2 Mon Sep 17 00:00:00 2001 From: Alex Ameen Date: Wed, 5 Jul 2023 13:36:47 -0500 Subject: [PATCH 06/15] Update pkgs/etc-profiles/pkg-fun.nix --- pkgs/etc-profiles/pkg-fun.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/etc-profiles/pkg-fun.nix b/pkgs/etc-profiles/pkg-fun.nix index 9ad6037..f6ab1e2 100644 --- a/pkgs/etc-profiles/pkg-fun.nix +++ b/pkgs/etc-profiles/pkg-fun.nix @@ -18,7 +18,7 @@ # ---------------------------------------------------------------------------- # pname = "etc-profiles"; - version = "0.1.0"; + version = "1.0.0"; ldFloxlib = ld-floxlib; # XXX comment this avoids unnecessary copy of pkg drv = derivation { inherit pname version system ldFloxlib; From a5e89dfe193f3a5abb01c56b6857684c365c6233 Mon Sep 17 00:00:00 2001 From: Alex Ameen Date: Wed, 5 Jul 2023 13:41:06 -0500 Subject: [PATCH 07/15] restore flake.nix/lock --- flake.lock | 74 +++++++++++++++++++++++++++++++----------------------- flake.nix | 73 +++-------------------------------------------------- 2 files changed, 45 insertions(+), 102 deletions(-) diff --git a/flake.lock b/flake.lock index b467d4e..e92331a 100644 --- a/flake.lock +++ b/flake.lock @@ -177,11 +177,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1688164448, - "narHash": "sha256-ds7oVoW7StxSY2pXXyaAESltjnKshk3YmFUlqlGkQ6s=", + "lastModified": 1688575273, + "narHash": "sha256-yFOXCPZaYkHoo5+AOL6k4cLFCFvyzy5442zZ/v3jd3w=", "owner": "flox", "repo": "etc-profiles", - "rev": "c25be86a0a44a5413af911d7f15a6405f21738c2", + "rev": "fe737f4999753c071ffa33d5aae560d6f696326c", "type": "github" }, "original": { @@ -398,11 +398,11 @@ "tracelinks": "tracelinks" }, "locked": { - "lastModified": 1688445262, - "narHash": "sha256-uX28KY48ZyTczzzvEWnw0eTJqveIYHMbfVZvfrRjQVc=", + "lastModified": 1688579531, + "narHash": "sha256-YuFCIq7wrBpkeI025K5ZUTm50MrWoOi70W2xHg0Oxyw=", "owner": "flox", "repo": "floxpkgs", - "rev": "9b6c0b0397d2e692a7d5f205780b8c244131e4cf", + "rev": "870e682f4f06b9a6c31aef08b31683a21b50dd53", "type": "github" }, "original": { @@ -512,15 +512,15 @@ "locked": { "lastModified": 1688420709, "narHash": "sha256-+9MnUn7tY+gj6/jKiuIA0Sdfibv14Mei42Z60ErV+Qk=", - "ref": "refs/heads/main", + "owner": "flox", + "repo": "ld-floxlib", "rev": "7339fc72969af40cd8dc64184c3a0a335ec5fa3d", - "revCount": 4, - "type": "git", - "url": "ssh://git@github.com/flox/ld-floxlib" + "type": "github" }, "original": { - "type": "git", - "url": "ssh://git@github.com/flox/ld-floxlib" + "owner": "flox", + "repo": "ld-floxlib", + "type": "github" } }, "nixpkgs": { @@ -800,8 +800,18 @@ }, "nixpkgs_2": { "locked": { - "nixpkgs": { - "locked": { + "lastModified": 1687977148, + "narHash": "sha256-gUcXiU2GgjYIc65GOIemdBJZ+lkQxuyIh7OkR9j0gCo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "60a783e00517fce85c42c8c53fe0ed05ded5b2a4", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, "nixpkgs_3": { "locked": { "lastModified": 1685714850, @@ -869,11 +879,11 @@ "nixpkgs__flox__x86_64-linux": "nixpkgs__flox__x86_64-linux" }, "locked": { - "lastModified": 1688442813, - "narHash": "sha256-sLQ9/OOgS464JfXHDGn38LNnMqydN19ga3B/zXQGw7E=", + "lastModified": 1688498956, + "narHash": "sha256-+9OFco8cXud7UFDV3I34FkeYwZ/yM2qaGmzCxFshzuE=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "f04b9c97d95664812b3bc100e4d4882edd022ab6", + "rev": "b1768bf1db771132d0d4f3693c5811020cc3fc62", "type": "github" }, "original": { @@ -932,11 +942,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1688442698, - "narHash": "sha256-XOQ5euPwDi4Z5sK1IH8Oukp/dftCAPxjfSp7/z2yYOc=", + "lastModified": 1688498546, + "narHash": "sha256-JndTnGyx9HdqIwNQNbvEHedvXh4o6zliJRpZcDQNN/w=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "974acdaffbc02e7362ca09eb45e408353e4700f4", + "rev": "dbe1bfeadf2f7bf7dd22f69658844c9d782d6b3b", "type": "github" }, "original": { @@ -970,11 +980,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1688414073, - "narHash": "sha256-PNERhrx0JpjijMScn9O1q+VZnyplbD72pi/47fuPUTI=", + "lastModified": 1688498510, + "narHash": "sha256-DUOSznfbLDeIy3q8EC1afYwWNWtCWxAH/xLD28/lReU=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "54cd1273a4da56e9d471e3bc2884983d1623e60e", + "rev": "9ccad7d2cfdab8f293816bf43ac222ce51098842", "type": "github" }, "original": { @@ -1008,11 +1018,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1688414430, - "narHash": "sha256-Uvd6ljDqNCkDPUStRVptnquGuKkQilM8NF7vPD8hnv8=", + "lastModified": 1688498834, + "narHash": "sha256-Mih9e1nERxEQA8lLvvMXGMo3WdbdXoBV1SYBCMCcGfk=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "0e79bbbd770ff7af93bc11fd498be2ab345e4f19", + "rev": "077e7109552680d42f90b3b0580cf69f38bc2844", "type": "github" }, "original": { @@ -1046,11 +1056,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1688414420, - "narHash": "sha256-gd7gHHG0cAtbc956rnfwVH6czsT1fDI29oEn4mk0J1o=", + "lastModified": 1688498819, + "narHash": "sha256-9DfjpOq0CGRb7ZJbGjU4l9eP+GZKNF7wRnEHI17jkvc=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "ff0e094fcaaafcc10178bb9f62ed113ff646e45c", + "rev": "b2398ec80e457eddb5adec519116d78aa034bbd5", "type": "github" }, "original": { @@ -1084,11 +1094,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1688414398, - "narHash": "sha256-1bmG2iTPf7T06AVNvJvwFfMbTdD4qJjlMfLC6zYkJmI=", + "lastModified": 1688498782, + "narHash": "sha256-9UPuie0HO0sbtnoaxe97IMrBwfDvZXNHqIl3+vrzkQY=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "fef6adcaefa98ecc8cfcb9ea0c0ee9a66c613922", + "rev": "d8bbbb86c3bcc4ef7508b6ca92681e547388e81c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 130dd66..c2ebaf1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,76 +1,9 @@ -# ============================================================================ # -# -# -# -# ---------------------------------------------------------------------------- # - { - -# ---------------------------------------------------------------------------- # - description = "Installable /etc/profile.d activation scripts for use with flox"; + inputs.flox-floxpkgs.url = "github:flox/floxpkgs"; + inputs.ld-floxlib.url = "github:flox/ld-floxlib"; -# ---------------------------------------------------------------------------- # - - outputs = { self, nixpkgs, ... } @ inputs: let - -# ---------------------------------------------------------------------------- # - - eachDefaultSystemMap = let - defaultSystems = [ - "x86_64-linux" "aarch64-linux" - "x86_64-darwin" "aarch64-darwin" - ]; - in fn: let - proc = system: { name = system; value = fn system; }; - in builtins.listToAttrs ( map proc defaultSystems ); - - -# ---------------------------------------------------------------------------- # - - overlays.etc-profiles = final: prev: { - etc-profiles = final.callPackage ./pkgs/etc-profiles { - src = if self.sourceInfo ? rev then self else - builtins.path { path = ./.; }; - ldFloxlib = null; # FIXME - inherit inputs; - }; - }; - overlays.default = overlays.etc-profiles; - - -# ---------------------------------------------------------------------------- # - - legacyPackages = eachDefaultSystemMap ( system: let - nixpkgsFor = builtins.getAttr system nixpkgs.legacyPackages; - pkgsFor = nixpkgsFor.extend overlays.default; - in { - inherit (pkgsFor) etc-profiles; - } ); - -# ---------------------------------------------------------------------------- # - - in { - - inherit overlays legacyPackages; - - packages = eachDefaultSystemMap ( system: { - inherit (builtins.getAttr system legacyPackages) etc-profiles; - default = ( builtins.getAttr system legacyPackages ).etc-profiles; - } ); - - }; - - -# ---------------------------------------------------------------------------- # - + outputs = args @ {flox-floxpkgs, ...}: flox-floxpkgs.project args (_: {}); } - - -# ---------------------------------------------------------------------------- # -# -# -# -# ============================================================================ # From 72dd7283870c6f57399e9fcad7e080de781d1186 Mon Sep 17 00:00:00 2001 From: Alex Ameen Date: Wed, 5 Jul 2023 14:01:26 -0500 Subject: [PATCH 08/15] doc: document library path handlers --- profile.d/0100_common-paths.sh | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/profile.d/0100_common-paths.sh b/profile.d/0100_common-paths.sh index f3f3f4c..57d583b 100644 --- a/profile.d/0100_common-paths.sh +++ b/profile.d/0100_common-paths.sh @@ -28,11 +28,43 @@ export \ XDG_DATA_DIRS \ ; -if [ -z "${FLOX_NOSET_LD_LIBRARY_PATH:-}" ]; then +# Use `FLOX_SET_LD_LIBRARY_PATH' to a non-empty string to use `LD_LIBRARY_PATH'. +# This is turned off by default in favor of the `LD_AUDIT' ( Linux ) and +# `DYLD_FALLBACK_LIBRARY_PATH' ( Darwin ) which are less likely to cause +# conflicts with executables built outside of `flox'. +if [ -n "${FLOX_SET_LD_LIBRARY_PATH:-}" ]; then LD_LIBRARY_PATH="$FLOX_ENV/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"; export LD_LIBRARY_PATH; fi +# By default on Linux: all executables run from an activated shell will operate +# with an intermediary between them and the system's dynamic loader using the +# `LD_AUDIT' interface of `ld-linux.so'. +# This allows failed library lookups to search `FLOX_ENV' for suitable +# libraries at runtime and build-time. +if [ -z "${FLOX_NOSET_LD_AUDIT:-}" ] && [ -e "$FLOX_ENV/lib/ld-floxlib.so" ]; +then + LD_AUDIT="$FLOX_ENV/lib/ld-floxlib.so"; + export LD_AUDIT; +fi + +# By default on Darwin: we append `DYLD_FALLBACK_LIBRARY_PATH' which indicates +# to the system loader that we would like to add "low priority" search paths. +# This allows failed library lookups to search `FLOX_ENV' for suitable +# libraries at runtime and build-time. +if [ -z "${FLOX_NOSET_DYLD_FALLBACK:-}" ]; then + case "$( uname; )" in + [dD]arwin*) + : "${DYLD_FALLBACK_LIBRARY_PATH:=/usr/local/lib:/usr/lib}"; + DYLD_FALLBACK_LIBRARY_PATH="$FLOX_ENV/lib:$DYLD_FALLBACK_LIBRARY_PATH"; + export DYLD_FALLBACK_LIBRARY_PATH; + ;; + *) + :; + ;; + esac +fi + # ---------------------------------------------------------------------------- # # From e8126514c54b36d9b3f984fc3d533b88d0f54b32 Mon Sep 17 00:00:00 2001 From: Alex Ameen Date: Wed, 5 Jul 2023 14:29:14 -0500 Subject: [PATCH 09/15] test: move test from floxpkgs --- .github/workflows/compare-nix.yml | 24 +++++++++++++++++++++--- .github/workflows/trivial-test.yml | 17 +++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compare-nix.yml b/.github/workflows/compare-nix.yml index 87e38c4..5b298e2 100644 --- a/.github/workflows/compare-nix.yml +++ b/.github/workflows/compare-nix.yml @@ -62,9 +62,10 @@ jobs: echo "selfURI: $selfURI" >&2; echo "Installing deps" >&2; - nix profile install 'nixpkgs#krb5^out,dev' -L; - nix profile install 'nixpkgs#pkg-config' -L; - nix profile install "$selfURI#etc-profiles" -L; + nix profile install 'nixpkgs#krb5^out,dev' -L; + nix profile install 'nixpkgs#pkg-config' -L; + nix profile install "$selfURI#etc-profiles" -L; + nix profile install "$selfURI#nodejs" -L; echo "Activating env" >&2; export FLOX_ENV="$HOME/.nix-profile"; @@ -84,3 +85,20 @@ jobs: echo "---" >&2; exit 1; fi + + - name: Node.js KRB5 Test + shell: bash + run: | + export FLOX_ENV="$HOME/.nix-profile"; + . "$FLOX_ENV/etc/profile"; + mkdir ./node-krb5; + cd ./node-krb5; + # Install `krb5' module with `npm'. + npm i krb5; + if [[ -x "$PWD/node_modules/krb5/build/Release/krb5.node" ]]; then + echo "PASS: npm" >&2; + exit 0; + else + echo "FAIL: npm" >&2; + exit 1; + fi diff --git a/.github/workflows/trivial-test.yml b/.github/workflows/trivial-test.yml index b549e7c..ee98a78 100644 --- a/.github/workflows/trivial-test.yml +++ b/.github/workflows/trivial-test.yml @@ -56,6 +56,7 @@ jobs: echo "Creating flox.nix" >&2; cat < ./flox.nix { + packages.nixpkgs-flox.nodejs = {}; packages.nixpkgs-flox.krb5 = { meta.outputsToInstall = ["out" "dev"]; }; @@ -95,3 +96,19 @@ jobs: echo "---" >&2; exit 1; fi + + - name: Node.js KRB5 Test + shell: bash + run: | + runEnv() { flox activate -e krb5-dev -- "$@"; } + mkdir ./node-krb5; + cd ./node-krb5; + # Install `krb5' module with `npm'. + runEnv npm i krb5; + if [[ -x "$PWD/node_modules/krb5/build/Release/krb5.node" ]]; then + echo "PASS: npm" >&2; + exit 0; + else + echo "FAIL: npm" >&2; + exit 1; + fi From a1e96ee75cac62457c2fc7d59a53c8424d8fef09 Mon Sep 17 00:00:00 2001 From: Alex Ameen Date: Wed, 5 Jul 2023 14:31:14 -0500 Subject: [PATCH 10/15] fix uri GHA --- .github/workflows/compare-nix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compare-nix.yml b/.github/workflows/compare-nix.yml index 5b298e2..841357d 100644 --- a/.github/workflows/compare-nix.yml +++ b/.github/workflows/compare-nix.yml @@ -65,7 +65,7 @@ jobs: nix profile install 'nixpkgs#krb5^out,dev' -L; nix profile install 'nixpkgs#pkg-config' -L; nix profile install "$selfURI#etc-profiles" -L; - nix profile install "$selfURI#nodejs" -L; + nix profile install "nixpkgs#nodejs" -L; echo "Activating env" >&2; export FLOX_ENV="$HOME/.nix-profile"; From 7627ba846cd38046687feef0de9a2ac37739c9af Mon Sep 17 00:00:00 2001 From: Alex Ameen Date: Mon, 24 Jul 2023 14:39:51 -0500 Subject: [PATCH 11/15] bump lock --- flake.lock | 596 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 467 insertions(+), 129 deletions(-) diff --git a/flake.lock b/flake.lock index e92331a..8fc58f3 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1683889736, - "narHash": "sha256-Sxn6VNrojAl9Tu0dDy6ZqPUe0GNwRKwzHAkptXM63Wg=", + "lastModified": 1688654208, + "narHash": "sha256-GXUr6KzbiMJvalLwTv/dFNdldfqbc5yDS4uktUpdZsw=", "owner": "flox", "repo": "builtfilter", - "rev": "f29903b144bb20e5be80f55d3fafa323c28a2cb0", + "rev": "441e6eea6920581da0bb5a2924431139bf25a15a", "type": "github" }, "original": { @@ -88,7 +88,7 @@ }, "capacitor_3": { "inputs": { - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_12", "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { @@ -138,11 +138,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1687310026, - "narHash": "sha256-20RHFbrnC+hsG4Hyeg/58LvQAK7JWfFItTPFAFamu8E=", + "lastModified": 1688772518, + "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=", "owner": "ipetkov", "repo": "crane", - "rev": "116b32c30b5ff28e49f4fcbeeb1bbe3544593204", + "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e", "type": "github" }, "original": { @@ -155,9 +155,30 @@ "inputs": { "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay_2" }, + "locked": { + "lastModified": 1688772518, + "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=", + "owner": "ipetkov", + "repo": "crane", + "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_3": { + "inputs": { + "flake-compat": "flake-compat_5", + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_13", + "rust-overlay": "rust-overlay_3" + }, "locked": { "lastModified": 1686621798, "narHash": "sha256-FUwWszmSiDzUdTk8f69xwMoYlhdPaLvDaIYOE/y6VXc=", @@ -177,11 +198,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1688575273, + "lastModified": 1688585987, "narHash": "sha256-yFOXCPZaYkHoo5+AOL6k4cLFCFvyzy5442zZ/v3jd3w=", "owner": "flox", "repo": "etc-profiles", - "rev": "fe737f4999753c071ffa33d5aae560d6f696326c", + "rev": "363488fbfe42825cf2efb2b4ca9d633a069d7404", "type": "github" }, "original": { @@ -254,16 +275,48 @@ "type": "github" } }, + "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_6": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" }, "locked": { - "lastModified": 1685518550, - "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "lastModified": 1687709756, + "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", "owner": "numtide", "repo": "flake-utils", - "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", "type": "github" }, "original": { @@ -294,6 +347,24 @@ "inputs": { "systems": "systems_3" }, + "locked": { + "lastModified": 1687709756, + "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_4" + }, "locked": { "lastModified": 1685518550, "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", @@ -308,9 +379,27 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_5": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" + }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { + "inputs": { + "systems": "systems_6" }, "locked": { "lastModified": 1685518550, @@ -347,7 +436,26 @@ }, "floco_2": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1684245865, + "narHash": "sha256-CJSxo7fvAAjdMaQWALyNG6LKMjOGZC/uxlbX1KuegWU=", + "owner": "aakropotkin", + "repo": "floco", + "rev": "e1231f054258f7d62652109725881767765b1efb", + "type": "github" + }, + "original": { + "owner": "aakropotkin", + "repo": "floco", + "rev": "e1231f054258f7d62652109725881767765b1efb", + "type": "github" + } + }, + "floco_3": { + "inputs": { + "nixpkgs": "nixpkgs_14" }, "locked": { "lastModified": 1684245865, @@ -366,19 +474,20 @@ }, "flox": { "inputs": { - "crane": "crane", - "floco": "floco", + "crane": "crane_3", + "floco": "floco_3", "flox-floxpkgs": [ + "ld-floxlib", "flox-floxpkgs" ], - "shellHooks": "shellHooks" + "shellHooks": "shellHooks_3" }, "locked": { - "lastModified": 1688045212, - "narHash": "sha256-xgSGJCp0aQrEeaFMAmNnkW6YG49/HnvULIhN5Keyw9M=", + "lastModified": 1686824858, + "narHash": "sha256-29En5YzPyNPTuKbEbc/19R0TjwyS+ZiD+xob+dCocOk=", "ref": "latest", - "rev": "f19cb5f907f077d4ebe54a497c9f20b90586f0da", - "revCount": 530, + "rev": "1ab9bb637a4871c9a8cf9ceaefa1f5b9d8bc8234", + "revCount": 519, "type": "git", "url": "ssh://git@github.com/flox/flox" }, @@ -393,16 +502,21 @@ "builtfilter": "builtfilter", "capacitor": "capacitor", "etc-profiles": "etc-profiles", - "flox": "flox", - "nixpkgs": "nixpkgs_6", + "flox": [ + "flox-floxpkgs", + "flox-latest" + ], + "flox-latest": "flox-latest", + "flox-main": "flox-main", + "nixpkgs": "nixpkgs_10", "tracelinks": "tracelinks" }, "locked": { - "lastModified": 1688579531, - "narHash": "sha256-YuFCIq7wrBpkeI025K5ZUTm50MrWoOi70W2xHg0Oxyw=", + "lastModified": 1690216698, + "narHash": "sha256-ZWLGSe3UZmOgtyHJoaNUHeL2SlfXqw61N+fRjhfTqEQ=", "owner": "flox", "repo": "floxpkgs", - "rev": "870e682f4f06b9a6c31aef08b31683a21b50dd53", + "rev": "4a2611a33fb9b90cc9114175ebc7b2503cd9145b", "type": "github" }, "original": { @@ -415,8 +529,8 @@ "inputs": { "builtfilter": "builtfilter_2", "capacitor": "capacitor_3", - "flox": "flox_2", - "nixpkgs": "nixpkgs_12", + "flox": "flox", + "nixpkgs": "nixpkgs_16", "tracelinks": "tracelinks_2" }, "locked": { @@ -433,36 +547,60 @@ "type": "github" } }, - "flox_2": { + "flox-latest": { + "inputs": { + "crane": "crane", + "floco": "floco", + "flox-floxpkgs": [ + "flox-floxpkgs" + ], + "shellHooks": "shellHooks" + }, + "locked": { + "lastModified": 1689848165, + "narHash": "sha256-PWg60LaDzlHUR7Qo/vivKsdOnmJp8EgKN+1wZRQr1ic=", + "ref": "latest", + "rev": "3df11a4f4bf4c1fc2f8164cbcc12831ae0c68730", + "revCount": 553, + "type": "git", + "url": "https://git@github.com/flox/flox" + }, + "original": { + "ref": "latest", + "type": "git", + "url": "https://git@github.com/flox/flox" + } + }, + "flox-main": { "inputs": { "crane": "crane_2", "floco": "floco_2", "flox-floxpkgs": [ - "ld-floxlib", "flox-floxpkgs" ], + "parser-util": "parser-util", "shellHooks": "shellHooks_2" }, "locked": { - "lastModified": 1686824858, - "narHash": "sha256-29En5YzPyNPTuKbEbc/19R0TjwyS+ZiD+xob+dCocOk=", - "ref": "latest", - "rev": "1ab9bb637a4871c9a8cf9ceaefa1f5b9d8bc8234", - "revCount": 519, + "lastModified": 1689982382, + "narHash": "sha256-HRRZ/IL65h0ZDvvZdon402KnMAhK7swpPQAOVAkoAEQ=", + "ref": "main", + "rev": "26da6790404d8dda6ab5d11a6502ea4a37e2a848", + "revCount": 555, "type": "git", - "url": "ssh://git@github.com/flox/flox" + "url": "https://git@github.com/flox/flox" }, "original": { - "ref": "latest", + "ref": "main", "type": "git", - "url": "ssh://git@github.com/flox/flox" + "url": "https://git@github.com/flox/flox" } }, "gitignore": { "inputs": { "nixpkgs": [ "flox-floxpkgs", - "flox", + "flox-latest", "shellHooks", "nixpkgs" ] @@ -482,6 +620,29 @@ } }, "gitignore_2": { + "inputs": { + "nixpkgs": [ + "flox-floxpkgs", + "flox-main", + "shellHooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_3": { "inputs": { "nixpkgs": [ "ld-floxlib", @@ -541,11 +702,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1688259758, - "narHash": "sha256-CYVbYQfIm3vwciCf6CCYE+WOOLE3vcfxfEfNHIfKUJQ=", + "lastModified": 1690073998, + "narHash": "sha256-qmK+VMvflwUzQSQl4XVP5kbodYLAKThNzq6mZrOM2Mo=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "a92befce80a487380ea5e92ae515fe33cebd3ac6", + "rev": "d0545f65611a9625f161d0ff02627bc364e024f6", "type": "github" }, "original": { @@ -556,11 +717,11 @@ }, "nixpkgs-lib_2": { "locked": { - "lastModified": 1688259758, - "narHash": "sha256-CYVbYQfIm3vwciCf6CCYE+WOOLE3vcfxfEfNHIfKUJQ=", + "lastModified": 1690073998, + "narHash": "sha256-qmK+VMvflwUzQSQl4XVP5kbodYLAKThNzq6mZrOM2Mo=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "a92befce80a487380ea5e92ae515fe33cebd3ac6", + "rev": "d0545f65611a9625f161d0ff02627bc364e024f6", "type": "github" }, "original": { @@ -616,6 +777,22 @@ } }, "nixpkgs-stable_2": { + "locked": { + "lastModified": 1685801374, + "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_3": { "locked": { "lastModified": 1687661089, "narHash": "sha256-RhF9PiNfOQpm/Q2BR+2305KDR9FCXD6QJizbZ5vxVvQ=", @@ -631,7 +808,7 @@ "type": "github" } }, - "nixpkgs-stable_3": { + "nixpkgs-stable_4": { "locked": { "lastModified": 1685801374, "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", @@ -647,7 +824,7 @@ "type": "github" } }, - "nixpkgs-stable_4": { + "nixpkgs-stable_5": { "locked": { "lastModified": 1684754342, "narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=", @@ -665,11 +842,11 @@ }, "nixpkgs-staging": { "locked": { - "lastModified": 1687807295, - "narHash": "sha256-7TUD0p0m4mZpIi1O+Cyk5NCqpJUnhv/CJOAuHOndjao=", + "lastModified": 1688231357, + "narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=", "owner": "flox", "repo": "nixpkgs", - "rev": "6b3d1b1cf13f407fef5e634b224d575eb7211975", + "rev": "645ff62e09d294a30de823cb568e9c6d68e92606", "type": "github" }, "original": { @@ -697,11 +874,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1688231357, - "narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=", + "lastModified": 1689940971, + "narHash": "sha256-397xShPnFqPC59Bmpo3lS+/Aw0yoDRMACGo1+h2VJMo=", "owner": "flox", "repo": "nixpkgs", - "rev": "645ff62e09d294a30de823cb568e9c6d68e92606", + "rev": "9ca785644d067445a4aa749902b29ccef61f7476", "type": "github" }, "original": { @@ -728,6 +905,86 @@ } }, "nixpkgs_10": { + "inputs": { + "capacitor": "capacitor_2", + "flox": [ + "flox-floxpkgs", + "flox" + ], + "flox-floxpkgs": [ + "flox-floxpkgs" + ], + "nixpkgs": "nixpkgs_11", + "nixpkgs-stable": "nixpkgs-stable_3", + "nixpkgs-staging": "nixpkgs-staging", + "nixpkgs-unstable": "nixpkgs-unstable", + "nixpkgs__flox__aarch64-darwin": "nixpkgs__flox__aarch64-darwin", + "nixpkgs__flox__aarch64-linux": "nixpkgs__flox__aarch64-linux", + "nixpkgs__flox__i686-linux": "nixpkgs__flox__i686-linux", + "nixpkgs__flox__x86_64-darwin": "nixpkgs__flox__x86_64-darwin", + "nixpkgs__flox__x86_64-linux": "nixpkgs__flox__x86_64-linux" + }, + "locked": { + "lastModified": 1690110696, + "narHash": "sha256-e4pADf4aQ/yWUBGSqdYgjRYNvnIMDaFpm7YTu52bS+0=", + "owner": "flox", + "repo": "nixpkgs-flox", + "rev": "dc0f3e8822bbcb9fd0e876c0d55a3ccf28726e18", + "type": "github" + }, + "original": { + "owner": "flox", + "repo": "nixpkgs-flox", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1687661089, + "narHash": "sha256-RhF9PiNfOQpm/Q2BR+2305KDR9FCXD6QJizbZ5vxVvQ=", + "owner": "flox", + "repo": "nixpkgs", + "rev": "f742512ccc99e6ac457d6d4ddce78f283c4bbfde", + "type": "github" + }, + "original": { + "id": "nixpkgs-stable", + "type": "indirect" + } + }, + "nixpkgs_12": { + "locked": { + "lastModified": 1684754342, + "narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=", + "owner": "flox", + "repo": "nixpkgs", + "rev": "7084250df3d7f9735087d3234407f3c1fc2400e3", + "type": "github" + }, + "original": { + "owner": "flox", + "ref": "stable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_13": { + "locked": { + "lastModified": 1685714850, + "narHash": "sha256-OcvbIJq4CGwwFr9m7M/SQcDPZ64hhR4t77oZgEeh7ZY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c6ffce3d5df7b4c588ce80a0c6e2d2348a611707", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_14": { "locked": { "lastModified": 1674236650, "narHash": "sha256-B4GKL1YdJnII6DQNNJ4wDW1ySJVx2suB1h/v4Ql8J0Q=", @@ -741,7 +998,7 @@ "type": "indirect" } }, - "nixpkgs_11": { + "nixpkgs_15": { "locked": { "lastModified": 1685866647, "narHash": "sha256-4jKguNHY/edLYImB+uL8jKPL/vpfOvMmSlLAGfxSrnY=", @@ -757,7 +1014,7 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_16": { "inputs": { "capacitor": "capacitor_4", "flox": [ @@ -775,7 +1032,7 @@ "nixpkgs", "nixpkgs-stable" ], - "nixpkgs-stable": "nixpkgs-stable_4", + "nixpkgs-stable": "nixpkgs-stable_5", "nixpkgs-staging": "nixpkgs-staging_2", "nixpkgs-unstable": "nixpkgs-unstable_2", "nixpkgs__flox__aarch64-darwin": "nixpkgs__flox__aarch64-darwin_2", @@ -814,11 +1071,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1685714850, - "narHash": "sha256-OcvbIJq4CGwwFr9m7M/SQcDPZ64hhR4t77oZgEeh7ZY=", + "lastModified": 1688221086, + "narHash": "sha256-cdW6qUL71cNWhHCpMPOJjlw0wzSRP0pVlRn2vqX/VVg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c6ffce3d5df7b4c588ce80a0c6e2d2348a611707", + "rev": "cd99c2b3c9f160cd004318e0697f90bbd5960825", "type": "github" }, "original": { @@ -844,11 +1101,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1685866647, - "narHash": "sha256-4jKguNHY/edLYImB+uL8jKPL/vpfOvMmSlLAGfxSrnY=", + "lastModified": 1689261696, + "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a53a3bec10deef6e1cc1caba5bc60f53b959b1e8", + "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", "type": "github" }, "original": { @@ -859,76 +1116,57 @@ } }, "nixpkgs_6": { - "inputs": { - "capacitor": "capacitor_2", - "flox": [ - "flox-floxpkgs", - "flox" - ], - "flox-floxpkgs": [ - "flox-floxpkgs" - ], - "nixpkgs": "nixpkgs_7", - "nixpkgs-stable": "nixpkgs-stable_2", - "nixpkgs-staging": "nixpkgs-staging", - "nixpkgs-unstable": "nixpkgs-unstable", - "nixpkgs__flox__aarch64-darwin": "nixpkgs__flox__aarch64-darwin", - "nixpkgs__flox__aarch64-linux": "nixpkgs__flox__aarch64-linux", - "nixpkgs__flox__i686-linux": "nixpkgs__flox__i686-linux", - "nixpkgs__flox__x86_64-darwin": "nixpkgs__flox__x86_64-darwin", - "nixpkgs__flox__x86_64-linux": "nixpkgs__flox__x86_64-linux" - }, "locked": { - "lastModified": 1688498956, - "narHash": "sha256-+9OFco8cXud7UFDV3I34FkeYwZ/yM2qaGmzCxFshzuE=", - "owner": "flox", - "repo": "nixpkgs-flox", - "rev": "b1768bf1db771132d0d4f3693c5811020cc3fc62", + "lastModified": 1688221086, + "narHash": "sha256-cdW6qUL71cNWhHCpMPOJjlw0wzSRP0pVlRn2vqX/VVg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cd99c2b3c9f160cd004318e0697f90bbd5960825", "type": "github" }, "original": { - "owner": "flox", - "repo": "nixpkgs-flox", + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", "type": "github" } }, "nixpkgs_7": { "locked": { - "lastModified": 1687661089, - "narHash": "sha256-RhF9PiNfOQpm/Q2BR+2305KDR9FCXD6QJizbZ5vxVvQ=", - "owner": "flox", + "lastModified": 1674236650, + "narHash": "sha256-B4GKL1YdJnII6DQNNJ4wDW1ySJVx2suB1h/v4Ql8J0Q=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "f742512ccc99e6ac457d6d4ddce78f283c4bbfde", + "rev": "cfb43ad7b941d9c3606fb35d91228da7ebddbfc5", "type": "github" }, "original": { - "id": "nixpkgs-stable", + "id": "nixpkgs", "type": "indirect" } }, "nixpkgs_8": { "locked": { - "lastModified": 1684754342, - "narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=", - "owner": "flox", + "lastModified": 1686178082, + "narHash": "sha256-ll289AxpC7tomi516m5w8yG/U81k3IR68VGui19pRyw=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "7084250df3d7f9735087d3234407f3c1fc2400e3", + "rev": "b9e05544c9b0a382d3416d602791a63ec2e63217", "type": "github" }, "original": { - "owner": "flox", - "ref": "stable", + "owner": "NixOS", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_9": { "locked": { - "lastModified": 1685714850, - "narHash": "sha256-OcvbIJq4CGwwFr9m7M/SQcDPZ64hhR4t77oZgEeh7ZY=", + "lastModified": 1689261696, + "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c6ffce3d5df7b4c588ce80a0c6e2d2348a611707", + "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", "type": "github" }, "original": { @@ -942,11 +1180,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1688498546, - "narHash": "sha256-JndTnGyx9HdqIwNQNbvEHedvXh4o6zliJRpZcDQNN/w=", + "lastModified": 1690110590, + "narHash": "sha256-nCixqkV0aHhWK6xRo3H7KG0h+mDWM28XAtKDF+nxnZI=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "dbe1bfeadf2f7bf7dd22f69658844c9d782d6b3b", + "rev": "62e9e4775a9c34e210c888d7bf62e68ed2a4cd21", "type": "github" }, "original": { @@ -980,11 +1218,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1688498510, - "narHash": "sha256-DUOSznfbLDeIy3q8EC1afYwWNWtCWxAH/xLD28/lReU=", + "lastModified": 1690075531, + "narHash": "sha256-LEETPMZ0KAWdWjntmLRHtnbP5L0WPE2HQ/Z6nQfKH3o=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "9ccad7d2cfdab8f293816bf43ac222ce51098842", + "rev": "34e592051adf3b56c3f8bedb3a8ab9bf86637c7e", "type": "github" }, "original": { @@ -1018,11 +1256,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1688498834, - "narHash": "sha256-Mih9e1nERxEQA8lLvvMXGMo3WdbdXoBV1SYBCMCcGfk=", + "lastModified": 1690075935, + "narHash": "sha256-XvoMQhH3w19e/QFNgmP71pl3EHXj3y3jPte9aMFANJY=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "077e7109552680d42f90b3b0580cf69f38bc2844", + "rev": "e1bf0993c8f8483fe75c1febfa32a20ef0f83fbf", "type": "github" }, "original": { @@ -1056,11 +1294,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1688498819, - "narHash": "sha256-9DfjpOq0CGRb7ZJbGjU4l9eP+GZKNF7wRnEHI17jkvc=", + "lastModified": 1690075924, + "narHash": "sha256-CjI/QKzMjWa+J6jM+Gh4pv5XXykRbX2mOsAJ5YQ+sC4=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "b2398ec80e457eddb5adec519116d78aa034bbd5", + "rev": "cddc48d8cdbfef121ab5a3e8f9d18bbb1be35b30", "type": "github" }, "original": { @@ -1094,11 +1332,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1688498782, - "narHash": "sha256-9UPuie0HO0sbtnoaxe97IMrBwfDvZXNHqIl3+vrzkQY=", + "lastModified": 1690075896, + "narHash": "sha256-DyTMODqbmvDN3/eBsLfL42UYUFTFhd8Im5VlqH7j8ZU=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "d8bbbb86c3bcc4ef7508b6ca92681e547388e81c", + "rev": "ea6083a09215035b2f9ab74b8457705fd624fe68", "type": "github" }, "original": { @@ -1128,6 +1366,25 @@ "type": "github" } }, + "parser-util": { + "inputs": { + "nixpkgs": "nixpkgs_8" + }, + "locked": { + "lastModified": 1689966475, + "narHash": "sha256-f+AL7gVt61kj7NkZ7xC4CneYiwLHxfF+s21Al5/UEWM=", + "owner": "flox", + "repo": "parser-util", + "rev": "1df96a9344d3f0568111202e10fbfa5f5c393a52", + "type": "github" + }, + "original": { + "owner": "flox", + "ref": "v0", + "repo": "parser-util", + "type": "github" + } + }, "root": { "inputs": { "flox-floxpkgs": "flox-floxpkgs", @@ -1138,23 +1395,23 @@ "inputs": { "flake-utils": [ "flox-floxpkgs", - "flox", + "flox-latest", "crane", "flake-utils" ], "nixpkgs": [ "flox-floxpkgs", - "flox", + "flox-latest", "crane", "nixpkgs" ] }, "locked": { - "lastModified": 1685759304, - "narHash": "sha256-I3YBH6MS3G5kGzNuc1G0f9uYfTcNY9NYoRc3QsykLk4=", + "lastModified": 1688351637, + "narHash": "sha256-CLTufJ29VxNOIZ8UTg0lepsn3X03AmopmaLTTeHDCL4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "c535b4f3327910c96dcf21851bbdd074d0760290", + "rev": "f9b92316727af9e6c7fee4a761242f7f46880329", "type": "github" }, "original": { @@ -1164,6 +1421,35 @@ } }, "rust-overlay_2": { + "inputs": { + "flake-utils": [ + "flox-floxpkgs", + "flox-main", + "crane", + "flake-utils" + ], + "nixpkgs": [ + "flox-floxpkgs", + "flox-main", + "crane", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688351637, + "narHash": "sha256-CLTufJ29VxNOIZ8UTg0lepsn3X03AmopmaLTTeHDCL4=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "f9b92316727af9e6c7fee4a761242f7f46880329", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_3": { "inputs": { "flake-utils": [ "ld-floxlib", @@ -1203,11 +1489,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1687779420, - "narHash": "sha256-noueZE/Z5qx6NF/grg46qlpZ/1nuPpc92RvqgCmRaLI=", + "lastModified": 1689668210, + "narHash": "sha256-XAATwDkaUxH958yXLs1lcEOmU6pSEIkatY3qjqk8X0E=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "1fa438eee82f35bdd4bc30a9aacd7648d757b388", + "rev": "eb433bff05b285258be76513add6f6c57b441775", "type": "github" }, "original": { @@ -1221,8 +1507,30 @@ "flake-compat": "flake-compat_4", "flake-utils": "flake-utils_4", "gitignore": "gitignore_2", - "nixpkgs": "nixpkgs_11", - "nixpkgs-stable": "nixpkgs-stable_3" + "nixpkgs": "nixpkgs_9", + "nixpkgs-stable": "nixpkgs-stable_2" + }, + "locked": { + "lastModified": 1689668210, + "narHash": "sha256-XAATwDkaUxH958yXLs1lcEOmU6pSEIkatY3qjqk8X0E=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "eb433bff05b285258be76513add6f6c57b441775", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "shellHooks_3": { + "inputs": { + "flake-compat": "flake-compat_6", + "flake-utils": "flake-utils_6", + "gitignore": "gitignore_3", + "nixpkgs": "nixpkgs_15", + "nixpkgs-stable": "nixpkgs-stable_4" }, "locked": { "lastModified": 1686668298, @@ -1298,6 +1606,36 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tracelinks": { "inputs": { "flox-floxpkgs": [ From 9f82aa84618398a1116fb93203677d7c823e679e Mon Sep 17 00:00:00 2001 From: Alex Ameen Date: Tue, 25 Jul 2023 10:57:17 -0500 Subject: [PATCH 12/15] add workflow triggers --- .github/workflows/compare-nix.yml | 1 + .github/workflows/trivial-test.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/compare-nix.yml b/.github/workflows/compare-nix.yml index 841357d..7bd207f 100644 --- a/.github/workflows/compare-nix.yml +++ b/.github/workflows/compare-nix.yml @@ -1,6 +1,7 @@ name: Compared to Nix on: + workflow_dispatch: pull_request: types: [opened, synchronize, reopened] paths: diff --git a/.github/workflows/trivial-test.yml b/.github/workflows/trivial-test.yml index ee98a78..8c9e9fe 100644 --- a/.github/workflows/trivial-test.yml +++ b/.github/workflows/trivial-test.yml @@ -1,6 +1,7 @@ name: Trivial Test on: + workflow_dispatch: pull_request: types: [opened, synchronize, reopened] paths: From ced9402899069c9c88ccca4b8eee25dfdb3991ef Mon Sep 17 00:00:00 2001 From: Alex Ameen Date: Tue, 25 Jul 2023 10:58:22 -0500 Subject: [PATCH 13/15] bump lock --- flake.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 8fc58f3..7280bb5 100644 --- a/flake.lock +++ b/flake.lock @@ -512,11 +512,11 @@ "tracelinks": "tracelinks" }, "locked": { - "lastModified": 1690216698, - "narHash": "sha256-ZWLGSe3UZmOgtyHJoaNUHeL2SlfXqw61N+fRjhfTqEQ=", + "lastModified": 1690263020, + "narHash": "sha256-RSBxZSf6I/Z4RvWqin981raY9fiqrgQ58iX+jmpQnyA=", "owner": "flox", "repo": "floxpkgs", - "rev": "4a2611a33fb9b90cc9114175ebc7b2503cd9145b", + "rev": "c850aea3987b5ab7bde578972649e8d8d678e431", "type": "github" }, "original": { @@ -874,11 +874,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1689940971, - "narHash": "sha256-397xShPnFqPC59Bmpo3lS+/Aw0yoDRMACGo1+h2VJMo=", + "lastModified": 1690031011, + "narHash": "sha256-kzK0P4Smt7CL53YCdZCBbt9uBFFhE0iNvCki20etAf4=", "owner": "flox", "repo": "nixpkgs", - "rev": "9ca785644d067445a4aa749902b29ccef61f7476", + "rev": "12303c652b881435065a98729eb7278313041e49", "type": "github" }, "original": { @@ -925,11 +925,11 @@ "nixpkgs__flox__x86_64-linux": "nixpkgs__flox__x86_64-linux" }, "locked": { - "lastModified": 1690110696, - "narHash": "sha256-e4pADf4aQ/yWUBGSqdYgjRYNvnIMDaFpm7YTu52bS+0=", + "lastModified": 1690262972, + "narHash": "sha256-Q5djAzMcFI4GWL52s/3VzBLTV2cPiBjk+IYpAx6U+wo=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "dc0f3e8822bbcb9fd0e876c0d55a3ccf28726e18", + "rev": "453da5b130a43258c2ab95b13fc0fcdb072ecfe7", "type": "github" }, "original": { @@ -1180,11 +1180,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1690110590, - "narHash": "sha256-nCixqkV0aHhWK6xRo3H7KG0h+mDWM28XAtKDF+nxnZI=", + "lastModified": 1690262846, + "narHash": "sha256-FeVqddhzoUB5k9H/zNVp8OjKJ6CTbYefh/ctXRjFhJc=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "62e9e4775a9c34e210c888d7bf62e68ed2a4cd21", + "rev": "cfe2611fe3545ac9749bc76a0646f03ed3957da0", "type": "github" }, "original": { @@ -1218,11 +1218,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1690075531, - "narHash": "sha256-LEETPMZ0KAWdWjntmLRHtnbP5L0WPE2HQ/Z6nQfKH3o=", + "lastModified": 1690236586, + "narHash": "sha256-P3doHm6AT8IeDfaq98ZFHBmQCaER+Fty+YP3+BLbj7E=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "34e592051adf3b56c3f8bedb3a8ab9bf86637c7e", + "rev": "bbaff965172486cc9c6edbe68becb312b32733eb", "type": "github" }, "original": { @@ -1256,11 +1256,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1690075935, - "narHash": "sha256-XvoMQhH3w19e/QFNgmP71pl3EHXj3y3jPte9aMFANJY=", + "lastModified": 1690237036, + "narHash": "sha256-IBChKo08PmNfknkxvojb2vkYJJ/uytz8i6QEd/lNBtI=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "e1bf0993c8f8483fe75c1febfa32a20ef0f83fbf", + "rev": "4383db6ecb4b337d576ed2fce17fd3521b22f5de", "type": "github" }, "original": { @@ -1294,11 +1294,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1690075924, - "narHash": "sha256-CjI/QKzMjWa+J6jM+Gh4pv5XXykRbX2mOsAJ5YQ+sC4=", + "lastModified": 1690237025, + "narHash": "sha256-g2TQ+/PSWCbzeyqoM54TTorNGzgCBzPMvAgO/ithQao=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "cddc48d8cdbfef121ab5a3e8f9d18bbb1be35b30", + "rev": "21c22a944047220c27abdec103de4f50e37c1299", "type": "github" }, "original": { @@ -1332,11 +1332,11 @@ "flake": false, "locked": { "host": "catalog.floxsdlc.com", - "lastModified": 1690075896, - "narHash": "sha256-DyTMODqbmvDN3/eBsLfL42UYUFTFhd8Im5VlqH7j8ZU=", + "lastModified": 1690236997, + "narHash": "sha256-GWGy2+vvfTGmfHISPg3kLy8ab4EMYRopUw/JxcRAOjA=", "owner": "flox", "repo": "nixpkgs-flox", - "rev": "ea6083a09215035b2f9ab74b8457705fd624fe68", + "rev": "599c6fa57a56965d9e47005d9c1a7dded9e3dbe8", "type": "github" }, "original": { From c4ad1f11c0f50f76b042408f09960c1819dfff40 Mon Sep 17 00:00:00 2001 From: Alex Ameen Date: Tue, 25 Jul 2023 12:11:09 -0500 Subject: [PATCH 14/15] use flox pre-release --- .github/workflows/trivial-test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/trivial-test.yml b/.github/workflows/trivial-test.yml index 8c9e9fe..0cf5a1a 100644 --- a/.github/workflows/trivial-test.yml +++ b/.github/workflows/trivial-test.yml @@ -21,7 +21,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Install flox - uses: flox/install-flox-action@v1.0.0 + uses: flox/install-flox-action@v1.1.0 + with: + flox-installable-uri: "github:flox/floxpkgs#flox-prerelease.fromCatalog" - name: Checkout uses: actions/checkout@v3 From ebfdcf75f8cdc01ae6e158346505ab65a0898638 Mon Sep 17 00:00:00 2001 From: Tom Bereknyei Date: Thu, 27 Jul 2023 21:46:23 -0400 Subject: [PATCH 15/15] fix: provide defaults for non-existent attributes --- pkgs/etc-profiles/pkg-fun.nix | 196 ++++++++++++++++++---------------- 1 file changed, 104 insertions(+), 92 deletions(-) diff --git a/pkgs/etc-profiles/pkg-fun.nix b/pkgs/etc-profiles/pkg-fun.nix index f6ab1e2..6315dcd 100644 --- a/pkgs/etc-profiles/pkg-fun.nix +++ b/pkgs/etc-profiles/pkg-fun.nix @@ -4,108 +4,120 @@ # `/etc/profile.d/*.sh' "child scripts". # # ---------------------------------------------------------------------------- # - -{ src -, lib -, ld-floxlib -, config -, bash -, coreutils -, hostPlatform -, system +{ + src, + lib, + ld-floxlib, + config, + bash, + coreutils, + hostPlatform, + system, }: let - -# ---------------------------------------------------------------------------- # - - pname = "etc-profiles"; - version = "1.0.0"; + # ---------------------------------------------------------------------------- # + pname = "etc-profiles"; + version = "1.0.0"; ldFloxlib = ld-floxlib; # XXX comment this avoids unnecessary copy of pkg - drv = derivation { + drv = derivation { inherit pname version system ldFloxlib; - name = pname + "-" + version; - builder = bash.outPath + "/bin/bash"; - outputs = ["common_paths" "node" "python3" "out"]; - profile = builtins.path { path = ( toString src ) + "/profile"; }; - profile_d = builtins.path { path = ( toString src ) + "/profile.d"; }; - PATH = coreutils.outPath + "/bin"; - args = ["-eu" "-o" "pipefail" "-c" '' - mkdir -p "$out/etc" \ - "$out/lib" \ - "$common_paths/etc/profile.d" \ - "$node/etc/profile.d" \ - "$python3/etc/profile.d" \ - ; - cp -- "$profile" "$out/etc/profile"; - cp -- "$profile_d/0100_common-paths.sh" "$common_paths/etc/profile.d/"; - cp -- "$profile_d/0500_node.sh" "$node/etc/profile.d/"; - cp -- "$profile_d/0500_python3.sh" "$python3/etc/profile.d/"; - ${if ! hostPlatform.isLinux then "" else '' - ln -s -- "$ldFloxlib/lib/"* "$out/lib/"; - '' - } - '']; - }; - - -# --------------------------------------------------------------------------- # - -in drv // { - meta = let - lfm = ldFloxlib.meta or {}; - license = lib.licenses.mit; - # Inherit broken from `ld-floxlib' - broken = if hostPlatform.isLinux then ( lfm.broken or false ) else false; - platforms = [ - "x86_64-linux" "aarch64-linux" "i686-linux" - "x86_64-darwin" "aarch64-darwin" + name = pname + "-" + version; + builder = bash.outPath + "/bin/bash"; + outputs = ["common_paths" "node" "python3" "out"]; + profile = builtins.path {path = (toString src) + "/profile";}; + profile_d = builtins.path {path = (toString src) + "/profile.d";}; + PATH = coreutils.outPath + "/bin"; + args = [ + "-eu" + "-o" + "pipefail" + "-c" + '' + mkdir -p "$out/etc" \ + "$out/lib" \ + "$common_paths/etc/profile.d" \ + "$node/etc/profile.d" \ + "$python3/etc/profile.d" \ + ; + cp -- "$profile" "$out/etc/profile"; + cp -- "$profile_d/0100_common-paths.sh" "$common_paths/etc/profile.d/"; + cp -- "$profile_d/0500_node.sh" "$node/etc/profile.d/"; + cp -- "$profile_d/0500_python3.sh" "$python3/etc/profile.d/"; + ${ + if ! hostPlatform.isLinux + then "" + else '' + ln -s -- "$ldFloxlib/lib/"* "$out/lib/"; + '' + } + '' ]; - unsupported = ! ( builtins.elem hostPlatform.system platforms ); - unfree = ! license.free; - in { - inherit (drv) name; - inherit license broken platforms unfree unsupported; - available = ( config.allowBroken || ( ! broken ) ) && - ( config.allowUnfree || ( ! unfree ) ) && - ( config.allowUnsupportedSystem || ( ! unsupported ) ); - homepage = "https://github.com/flox/etc-profiles"; - outputsToInstall = ["common_paths" "python3" "node" "out"]; - description = '' - Installable /etc/profile.d activation scripts for use with flox - ''; - longDescription = '' - An `/etc/profile' script to source `/etc/profile.d/*.sh` + }; + # --------------------------------------------------------------------------- # +in + drv + // { + meta = let + lfm = ldFloxlib.meta or {}; + license = lib.licenses.mit; + # Inherit broken from `ld-floxlib' + broken = + if hostPlatform.isLinux + then (lfm.broken or false) + else false; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "i686-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + unsupported = ! (builtins.elem hostPlatform.system platforms); + unfree = ! license.free; + in { + inherit (drv) name; + inherit license broken platforms unfree unsupported; + available = + (config.allowBroken or false || (! broken)) + && (config.allowUnfree or false || (! unfree)) + && (config.allowUnsupportedSystem or false || (! unsupported)); + homepage = "https://github.com/flox/etc-profiles"; + outputsToInstall = ["common_paths" "python3" "node" "out"]; + description = '' + Installable /etc/profile.d activation scripts for use with flox + ''; + longDescription = '' + An `/etc/profile' script to source `/etc/profile.d/*.sh` - Users can define and install scripts in `/etc/profile.d' as - "custom packages"/installables to share common setup processes - across environments. + Users can define and install scripts in `/etc/profile.d' as + "custom packages"/installables to share common setup processes + across environments. - Recommended usage: - # flox.nix - { - packages.nixpkgs-flox.sqlite = { - meta.outputsToInstall = ["bin" "out" "dev"]; - }; - - # Provides developer environment hooks for use with python3. - packages.flox.etc-profiles = { - # Optionally, specify language packages to install. - # Please note that all/most language packs depend on including - # the "common_paths" output, and ALL depend on "out". - meta.outputsToInstall = ["out" "common_paths" "python3"]; - }; - - shell.hook = '${""}' - [[ -r "$FLOX_ENV/etc/profile" ]] && . "$FLOX_ENV/etc/profile"; - pkg-config --list-all >&2; - '${""}' - } - ''; - }; -} + Recommended usage: + # flox.nix + { + packages.nixpkgs-flox.sqlite = { + meta.outputsToInstall = ["bin" "out" "dev"]; + }; + # Provides developer environment hooks for use with python3. + packages.flox.etc-profiles = { + # Optionally, specify language packages to install. + # Please note that all/most language packs depend on including + # the "common_paths" output, and ALL depend on "out". + meta.outputsToInstall = ["out" "common_paths" "python3"]; + }; + shell.hook = '${""}' + [[ -r "$FLOX_ENV/etc/profile" ]] && . "$FLOX_ENV/etc/profile"; + pkg-config --list-all >&2; + '${""}' + } + ''; + }; + } # ---------------------------------------------------------------------------- # # # # # ============================================================================ # +