mirror of
https://codeberg.org/puppe/financier-nix.git
synced 2025-12-20 00:12:17 +01:00
Fix src for financier
We accidentally used to rely on the src for financier not having been garbage-collected.
This commit is contained in:
parent
25c955aac5
commit
98ab6e58f1
4 changed files with 10 additions and 4 deletions
|
|
@ -3,14 +3,12 @@
|
|||
}, system ? builtins.currentSystem}:
|
||||
|
||||
let
|
||||
meta = import ./meta.nix;
|
||||
derivations = import ./node2nix.nix {
|
||||
inherit pkgs system;
|
||||
};
|
||||
in
|
||||
derivations // {
|
||||
package = derivations.package.overrideAttrs (oldAttrs: rec {
|
||||
src = pkgs.fetchgit { inherit (meta) url rev sha256; };
|
||||
# Puppeteer (a dependency for testing) would try to download Chromium
|
||||
# during installation. Downloading Chromium would not work though because
|
||||
# Nix builds are sandboxed and cannot download arbitrary things. We
|
||||
|
|
|
|||
|
|
@ -3,3 +3,7 @@ node2nix "-$FINCANCIER_NODE_VERSION" --development \
|
|||
--lock "$FINANCIER_SRC/package-lock.json" \
|
||||
--supplement-input supplement.json \
|
||||
--composition node2nix.nix
|
||||
|
||||
# Fix the src attribute for the financier package
|
||||
pattern='\(\s*\).*'$(echo $FINANCIER_SRC | sed 's/\//\\\//g')'.*'
|
||||
sed -i "s/$pattern/\1src = (import .\/helpers.nix).fetchFinancier { inherit fetchgit; };/" node-packages.nix
|
||||
4
helpers.nix
Normal file
4
helpers.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
fetchFinancier = { fetchgit, meta ? import ./meta.nix }:
|
||||
fetchgit { inherit (meta) url rev sha256; };
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
meta = import ./meta.nix;
|
||||
src = pkgs.fetchgit { inherit (meta) url rev sha256; };
|
||||
src = (import ./helpers.nix).fetchFinancier { inherit (pkgs) fetchgit; inherit meta; };
|
||||
in
|
||||
pkgs.mkShell {
|
||||
shellHook = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue