1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-14 11:47:31 +00:00
Commit graph

302 commits

Author SHA1 Message Date
Robert Hensing
c3c5ecc05e
Merge pull request #232 from hercules-ci/package-template
Package template
2024-06-30 13:01:45 +02:00
Robert Hensing
3c51d54b88 flake.nix: Add templates.package 2024-06-30 12:55:15 +02:00
Robert Hensing
ec690b9358 template/package: Use fileset 2024-06-30 12:54:51 +02:00
hercules-ci[bot]
2a55567fcf
Merge pull request #229 from hercules-ci/flake-update
`flake.lock`: Update
2024-06-01 23:45:11 +00:00
Hercules CI Effects
5db20caf0c dev/flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/9ee8e1eff0bef65143657cf6d825ce00f8bccc35' (2024-05-02)
  → 'github:NixOS/nixpkgs/1fc28243e2f9ad794c8c5cea12e7352f270f734b' (2024-06-01)
• Updated input 'pre-commit-hooks-nix':
    'github:cachix/pre-commit-hooks.nix/2849da033884f54822af194400f8dff435ada242' (2024-04-30)
  → 'github:cachix/pre-commit-hooks.nix/0e8fcc54b842ad8428c9e705cb5994eaf05c26a0' (2024-05-20)
• Removed input 'pre-commit-hooks-nix/flake-utils'
• Removed input 'pre-commit-hooks-nix/flake-utils/systems'
2024-06-01 23:35:53 +00:00
Hercules CI Effects
b31c67e736 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    '50eb7ecf4c.tar.gz?narHash=sha256-QBx10%2Bk6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94%3D' (2024-05-02)
  → 'eb9ceca17d.tar.gz?narHash=sha256-lIbdfCsf8LMFloheeE6N31%2BBMIeixqyQWbSr2vk79EQ%3D' (2024-06-01)
2024-06-01 23:35:38 +00:00
Hercules CI Effects
9d2955e6dd flake.nix: Update nixpkgs-lib tree 2024-06-01 23:35:37 +00:00
Robert Hensing
8dc45382d5
Merge pull request #154 from hercules-ci/class
Add class: imports "type checking"
2024-05-16 15:16:44 +02:00
Robert Hensing
411e5ab0e8 Add class: imports "type checking"
Initially this had some feature checking with lib.functionArgs, but
I don't think this is useful. The _class attribute is not supported
by long-unsupported Nixpkgs (<23.05) anyway, so let's keep it simple.
2024-05-16 15:09:50 +02:00
Robert Hensing
bef010be01
Merge pull request #228 from hercules-ci/remove-mdDoc
maint: Remove lib.mdDoc calls
2024-05-16 15:06:45 +02:00
Robert Hensing
b5ab46fe03 maint: Remove lib.mdDoc calls 2024-05-16 15:00:17 +02:00
Robert Hensing
e5d10a24b6
Merge pull request #226 from hercules-ci/nixpkgs-lib
flake-update: Get the nixpkgs/lib subtree only
2024-05-02 11:10:30 +02:00
Robert Hensing
99b383f988 dev: Also update dev flake lock 2024-05-02 11:09:32 +02:00
Robert Hensing
e807eea9e8 flake-update: Get the nixpkgs/lib subtree only 2024-05-02 11:09:32 +02:00
hercules-ci[bot]
48724111e9
Merge pull request #227 from hercules-ci/flake-update
`flake.lock`: Update
2024-05-02 09:08:26 +00:00
Hercules CI Effects
497713541e dev/flake.lock: Update
Flake lock file updates:

• Updated input 'hercules-ci-effects':
    'github:hercules-ci/hercules-ci-effects/9684190de4cd0e75859f1939d13973fce3a7ce46' (2022-12-22)
  → 'github:hercules-ci/hercules-ci-effects/c0302ec12d569532a6b6bd218f698bc402e93adc' (2024-04-23)
• Updated input 'hercules-ci-effects/flake-parts':
    'github:hercules-ci/flake-parts/0e101dbae756d35a376a5e1faea532608e4a4b9a' (2022-10-27)
  → 'github:hercules-ci/flake-parts/9126214d0a59633752a136528f5f3b9aa8565b7d' (2024-04-01)
• Updated input 'hercules-ci-effects/flake-parts/nixpkgs-lib':
    'github:NixOS/nixpkgs/34c5293a71ffdb2fe054eb5288adc1882c1eb0b1?dir=lib' (2022-10-09)
  → follows 'hercules-ci-effects/nixpkgs'
• Removed input 'hercules-ci-effects/hercules-ci-agent'
• Removed input 'hercules-ci-effects/hercules-ci-agent/flake-parts'
• Removed input 'hercules-ci-effects/hercules-ci-agent/flake-parts/nixpkgs'
• Removed input 'hercules-ci-effects/hercules-ci-agent/nix-darwin'
• Removed input 'hercules-ci-effects/hercules-ci-agent/nix-darwin/nixpkgs'
• Removed input 'hercules-ci-effects/hercules-ci-agent/nixpkgs'
• Removed input 'hercules-ci-effects/hercules-ci-agent/pre-commit-hooks-nix'
• Removed input 'hercules-ci-effects/hercules-ci-agent/pre-commit-hooks-nix/flake-utils'
• Removed input 'hercules-ci-effects/hercules-ci-agent/pre-commit-hooks-nix/nixpkgs'
• Updated input 'hercules-ci-effects/nixpkgs':
    'github:NixOS/nixpkgs/52392d42c156db5b889db7f3cc3e9909e4259b2a' (2022-09-28)
  → 'github:NixOS/nixpkgs/6143fc5eeb9c4f00163267708e26191d1e918932' (2024-04-21)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/8009798849bc1e8d3540b0dd38e3a3260257bd88' (2023-03-09)
  → 'github:NixOS/nixpkgs/9ee8e1eff0bef65143657cf6d825ce00f8bccc35' (2024-05-02)
• Updated input 'pre-commit-hooks-nix':
    'github:cachix/pre-commit-hooks.nix/200790e9c77064c53eaf95805b013d96615ecc27' (2022-12-19)
  → 'github:cachix/pre-commit-hooks.nix/2849da033884f54822af194400f8dff435ada242' (2024-04-30)
• Updated input 'pre-commit-hooks-nix/flake-compat':
    'github:edolstra/flake-compat/009399224d5e398d03b22badca40a37ac85412a1' (2022-11-17)
  → 'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33' (2023-10-04)
• Updated input 'pre-commit-hooks-nix/flake-utils':
    'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
  → 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11)
• Added input 'pre-commit-hooks-nix/flake-utils/systems':
    'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
• Updated input 'pre-commit-hooks-nix/gitignore':
    'github:hercules-ci/gitignore.nix/a20de23b925fd8264fd7fad6454652e142fd7f73' (2022-08-14)
  → 'github:hercules-ci/gitignore.nix/637db329424fd7e46cf4185293b9cc8c88c95394' (2024-02-28)
• Updated input 'pre-commit-hooks-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/d513b448cc2a6da2c8803e3c197c9fc7e67b19e3' (2022-12-17)
  → 'github:NixOS/nixpkgs/614b4613980a522ba49f0d194531beddbb7220d3' (2024-03-17)
2024-05-02 09:01:08 +00:00
Hercules CI Effects
59fc6f4221 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/58a1abdbae3217ca6b702f03d3b35125d88a2994?dir=lib' (2024-04-27)
  → '50eb7ecf4c.tar.gz?narHash=sha256-QBx10%2Bk6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94%3D' (2024-05-02)
2024-05-02 09:00:52 +00:00
Hercules CI Effects
288fa518e2 flake.nix: Update nixpkgs-lib tree 2024-05-02 09:00:51 +00:00
hercules-ci[bot]
4d34ce6412
Merge pull request #225 from hercules-ci/flake-update
`flake.lock`: Update
2024-05-01 23:39:37 +00:00
Hercules CI Effects
ffe9d8eb04 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/d8fe5e6c92d0d190646fb9f1056741a229980089?dir=lib' (2024-03-29)
  → 'github:NixOS/nixpkgs/58a1abdbae3217ca6b702f03d3b35125d88a2994?dir=lib' (2024-04-27)
2024-05-01 23:35:45 +00:00
hercules-ci[bot]
9126214d0a
Merge pull request #219 from hercules-ci/flake-update
`flake.lock`: Update
2024-04-01 23:40:58 +00:00
Hercules CI Effects
c4c5c95859 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/1536926ef5621b09bba54035ae2bb6d806d72ac8?dir=lib' (2024-02-29)
  → 'github:NixOS/nixpkgs/d8fe5e6c92d0d190646fb9f1056741a229980089?dir=lib' (2024-03-29)
2024-04-01 23:36:10 +00:00
hercules-ci[bot]
f7b3c975cf
Merge pull request #216 from hercules-ci/flake-update
`flake.lock`: Update
2024-03-01 23:36:56 +00:00
Hercules CI Effects
c325169fbe flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/97b17f32362e475016f942bbdfda4a4a72a8a652?dir=lib' (2024-01-29)
  → 'github:NixOS/nixpkgs/1536926ef5621b09bba54035ae2bb6d806d72ac8?dir=lib' (2024-02-29)
2024-03-01 23:35:39 +00:00
hercules-ci[bot]
b253292d9c
Merge pull request #211 from hercules-ci/flake-update
`flake.lock`: Update
2024-02-01 23:40:56 +00:00
Hercules CI Effects
8a09934875 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/b0d36bd0a420ecee3bc916c91886caca87c894e9?dir=lib' (2023-12-30)
  → 'github:NixOS/nixpkgs/97b17f32362e475016f942bbdfda4a4a72a8a652?dir=lib' (2024-01-29)
2024-02-01 23:36:20 +00:00
Robert Hensing
60c614008e
Merge pull request #210 from MatthewCroughan/mc/explicit-inputs
templates: make flake-parts input explicit
2024-01-30 00:04:57 +01:00
Robert Hensing
b60b914ac6 dev: Make the test slightly more sensible 2024-01-30 00:00:55 +01:00
matthewcroughan
14114c563a templates: make flake-parts input explicit 2024-01-29 22:41:55 +00:00
Robert Hensing
bffc4be17f
Merge pull request #209 from hercules-ci/getexe
Getexe
2024-01-29 19:03:35 +01:00
Robert Hensing
238b0dc94b apps: Add polyfill 2024-01-29 18:57:52 +01:00
Robert Hensing
562a6b5e54 dev: Test apps 2024-01-29 18:57:10 +01:00
Robert Hensing
07f6395285
Merge pull request #206 from hercules-ci/transposition-errors
Transposition errors
2024-01-11 15:18:32 +01:00
Robert Hensing
528a7d0cb9 transposition: Explain incomplete usage of transposition
Abort because this is a clear programming error, that should never
be caught.
2024-01-11 12:59:37 +01:00
Robert Hensing
3a0408e3ac perSystem: Check that inputs'.<name> is a flake, for better error message
The alternative would have been to try and make this not an evaluation error,
but that would cause problems.

Idea: use filterAttrs to construct an attrset "inputFlakes". This would be
bad because it requires that we evaluate all inputs, just to see whether
they're flakes or not.

If Nix were to provide this metadata independently, which it could do
very efficiently, we still ought to wonder what's the purpose of
eliding those attributes. The only ways you'll encounter this
exception in `inputs'.<broken>` is by either
 - making a mistake, in which case the error message is great
 - or traversing all inputs, which nobody should do.

See https://flake.parts/best-practices-for-module-writing#do-not-traverse-inputs

Other idea: return *something empty*. This avoids the strictness
problem above, but still optimizes for the wrong use case.

Ultimately though, attribute transposition should not be needed at all,
but this project is largely dependent on the implicit schema imposed by Nix.
2024-01-11 12:46:03 +01:00
Robert Hensing
ac5d0b2d4d transposition: Improve perInput error message 2024-01-11 12:17:33 +01:00
hercules-ci[bot]
88a2cd8166
Merge pull request #204 from hercules-ci/flake-update
`flake.lock`: Update
2024-01-01 23:40:58 +00:00
Hercules CI Effects
a92a54c1b6 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/e92039b55bcd58469325ded85d4f58dd5a4eaf58?dir=lib' (2023-11-29)
  → 'github:NixOS/nixpkgs/b0d36bd0a420ecee3bc916c91886caca87c894e9?dir=lib' (2023-12-30)
2024-01-01 23:36:22 +00:00
DavHau
7de0c651b7 raise error when flake attribute doesn't exist
Currently when trying to access packages from input flakes for a system that isn't supported by that flake, the error is not very conclusive.
It costed me at least an hour to grasp this. Now putting in this error message to prevent others from falling into the same trap.
2023-12-10 20:07:51 +07:00
hercules-ci[bot]
34fed993f1
Merge pull request #199 from hercules-ci/flake-update
`flake.lock`: Update
2023-12-01 23:39:28 +00:00
Hercules CI Effects
f643cbabe3 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/0cbe9f69c234a7700596e943bfae7ef27a31b735?dir=lib' (2023-10-29)
  → 'github:NixOS/nixpkgs/e92039b55bcd58469325ded85d4f58dd5a4eaf58?dir=lib' (2023-11-29)
2023-12-01 23:36:19 +00:00
hercules-ci[bot]
8c9fa25450
Merge pull request #196 from hercules-ci/flake-update
`flake.lock`: Update
2023-11-01 23:41:02 +00:00
Hercules CI Effects
216e40a3f8 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/f5892ddac112a1e9b3612c39af1b72987ee5783a?dir=lib' (2023-09-29)
  → 'github:NixOS/nixpkgs/0cbe9f69c234a7700596e943bfae7ef27a31b735?dir=lib' (2023-10-29)
2023-11-01 23:36:20 +00:00
Robert Hensing
f76e870d64
Merge pull request #194 from hercules-ci/error-location
Fix default error location
2023-10-29 12:33:47 +01:00
Robert Hensing
e21f594423 Fix error location
The path didn't make it into the message because of a silly coding
mistake and overlooking the actual location in manual testing.
2023-10-29 12:30:12 +01:00
Robert Hensing
25abf6caa8
Merge pull request #192 from hercules-ci/moduleLocation
moduleLocation, but also automatic
2023-10-29 12:23:28 +01:00
Robert Hensing
c8c8e5661e Remove errorLocation from the tests
As mentioned in the previous commit, we don't have a use case for
this in flake-parts yet, as far as I'm aware. It can be exposed
when we do have a concrete use case where it is needed.
2023-10-14 00:06:42 +02:00
Robert Hensing
f427ecf1a0 Repurpose moduleLocation impl for new errorLocation
The difference is that moduleLocation is "guaranteed" reliable data,
whereas errorLocation is the best choice for error messages in the core.

moduleLocation is suitable for the module key attribute.
errorLocation is best for the *ROOT* module _file attribute.

Initially I applied errorLocation in too many places. It is only needed
when the flake output attribute names are strict in it.
To avoid confusion, I'm not exposing errorLocation to the modules, until
we have a concrete use case for it.
2023-10-14 00:03:28 +02:00
Robert Hensing
fc74939824 mkFlake: Prefer unsafeGetAttrPos over self.outPath for error message
This would not be advisable for anything other than error messages,
because Nix does not commit to any semantics for that function.
2023-10-13 23:03:07 +02:00
Robert Hensing
c9afaba3df
Merge pull request #190 from hercules-ci/template-package
Add template/package
2023-10-03 16:30:47 +02:00