mirror of
https://github.com/thegeneralist01/archivr
synced 2026-07-22 03:05:32 +02:00
fix(nix): guard pkgs.chromium behind isLinux for aarch64-darwin
This commit is contained in:
parent
e70c6b37cd
commit
ad1c4f8ee5
1 changed files with 6 additions and 8 deletions
14
flake.nix
14
flake.nix
|
|
@ -106,9 +106,8 @@
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgs.yt-dlp
|
pkgs.yt-dlp
|
||||||
pkgs.single-file-cli
|
pkgs.single-file-cli
|
||||||
pkgs.chromium
|
|
||||||
tweetPython
|
tweetPython
|
||||||
];
|
] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.chromium ];
|
||||||
phases = [ "installPhase" ];
|
phases = [ "installPhase" ];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/libexec/archivr
|
mkdir -p $out/bin $out/libexec/archivr
|
||||||
|
|
@ -118,16 +117,15 @@
|
||||||
makeWrapper $out/libexec/archivr/archivr $out/bin/archivr \
|
makeWrapper $out/libexec/archivr/archivr $out/bin/archivr \
|
||||||
--set ARCHIVR_YT_DLP ${pkgs.yt-dlp}/bin/yt-dlp \
|
--set ARCHIVR_YT_DLP ${pkgs.yt-dlp}/bin/yt-dlp \
|
||||||
--set ARCHIVR_SINGLE_FILE ${pkgs.single-file-cli}/bin/single-file \
|
--set ARCHIVR_SINGLE_FILE ${pkgs.single-file-cli}/bin/single-file \
|
||||||
--set ARCHIVR_CHROME ${pkgs.chromium}/bin/chromium \
|
${lib.optionalString pkgs.stdenv.isLinux "--set ARCHIVR_CHROME ${pkgs.chromium}/bin/chromium"} \
|
||||||
--set ARCHIVR_TWEET_PYTHON ${tweetPython}/bin/python3 \
|
--set ARCHIVR_TWEET_PYTHON ${tweetPython}/bin/python3 \
|
||||||
--set ARCHIVR_TWEET_SCRAPER $out/libexec/archivr/scrape_user_tweet_contents.py \
|
--set ARCHIVR_TWEET_SCRAPER $out/libexec/archivr/scrape_user_tweet_contents.py \
|
||||||
--prefix PATH : ${
|
--prefix PATH : ${
|
||||||
lib.makeBinPath [
|
lib.makeBinPath ([
|
||||||
pkgs.yt-dlp
|
pkgs.yt-dlp
|
||||||
pkgs.single-file-cli
|
pkgs.single-file-cli
|
||||||
pkgs.chromium
|
|
||||||
tweetPython
|
tweetPython
|
||||||
]
|
] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.chromium ])
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -135,7 +133,7 @@
|
||||||
pname = "archivr-server-wrapped";
|
pname = "archivr-server-wrapped";
|
||||||
inherit version;
|
inherit version;
|
||||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||||
buildInputs = [ tweetPython pkgs.single-file-cli pkgs.chromium ];
|
buildInputs = [ tweetPython pkgs.single-file-cli ] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.chromium ];
|
||||||
phases = [ "installPhase" ];
|
phases = [ "installPhase" ];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/libexec/archivr-server $out/share/archivr-server/static
|
mkdir -p $out/bin $out/libexec/archivr-server $out/share/archivr-server/static
|
||||||
|
|
@ -146,7 +144,7 @@
|
||||||
makeWrapper $out/libexec/archivr-server/archivr-server $out/bin/archivr-server \
|
makeWrapper $out/libexec/archivr-server/archivr-server $out/bin/archivr-server \
|
||||||
--set ARCHIVR_STATIC_DIR $out/share/archivr-server/static \
|
--set ARCHIVR_STATIC_DIR $out/share/archivr-server/static \
|
||||||
--set ARCHIVR_SINGLE_FILE ${pkgs.single-file-cli}/bin/single-file \
|
--set ARCHIVR_SINGLE_FILE ${pkgs.single-file-cli}/bin/single-file \
|
||||||
--set ARCHIVR_CHROME ${pkgs.chromium}/bin/chromium \
|
${lib.optionalString pkgs.stdenv.isLinux "--set ARCHIVR_CHROME ${pkgs.chromium}/bin/chromium"} \
|
||||||
--set ARCHIVR_TWEET_PYTHON ${tweetPython}/bin/python3 \
|
--set ARCHIVR_TWEET_PYTHON ${tweetPython}/bin/python3 \
|
||||||
--set ARCHIVR_TWEET_SCRAPER $out/libexec/archivr-server/scrape_user_tweet_contents.py
|
--set ARCHIVR_TWEET_SCRAPER $out/libexec/archivr-server/scrape_user_tweet_contents.py
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue