Skip to content

Commit

Permalink
Use named groups
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Nov 6, 2024
1 parent c3252ff commit 3f0e8d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/modules/manager/nix/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { NixFlakeLock } from './schema';
// as documented upstream
// https://github.com/NixOS/nix/blob/master/doc/manual/source/protocols/tarball-fetcher.md#gitea-and-forgejo-support
const lockableHTTPTarballProtocol = regEx(
'^https://([^/]+)/([^/]+)/([^/]+)/archive/(.+).tar.gz$',
'^https://(?<domain>[^/]+)/(?<owner>[^/]+)/(?<repo>[^/]+)/archive/(?<rev>.+).tar.gz$',
);

export function extractPackageFile(
Expand Down Expand Up @@ -119,7 +119,7 @@ export function extractPackageFile(
// istanbul ignore next: type tarball always contains this link
packageName: (flakeOriginal.url ?? '').replace(
lockableHTTPTarballProtocol,
'https://$1/$2/$3',
'https://$<domain>/$<owner>/$<repo>',
),
});
break;
Expand Down

0 comments on commit 3f0e8d9

Please sign in to comment.