refactor(3p): use josh from nixpkgs
The change we need has been released and propagated to nixos channels. Change-Id: Ib10a1d42d7ef6deaf5665a13b72ece345e83d7dc Reviewed-on: https://cl.tvl.fyi/c/depot/+/11457 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
d816b18fa6
commit
545eb05357
4 changed files with 3 additions and 52 deletions
|
@ -26,7 +26,7 @@ in
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
StateDirectory = "josh";
|
StateDirectory = "josh";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
ExecStart = "${depot.third_party.josh}/bin/josh-proxy --no-background --local /var/lib/josh --port ${toString cfg.port} --remote https://cl.tvl.fyi/ --require-auth";
|
ExecStart = "${pkgs.josh}/bin/josh-proxy --no-background --local /var/lib/josh --port ${toString cfg.port} --remote https://cl.tvl.fyi/ --require-auth";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
49
third_party/josh/default.nix
vendored
49
third_party/josh/default.nix
vendored
|
@ -1,49 +0,0 @@
|
||||||
# https://github.com/josh-project/josh
|
|
||||||
{ depot, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
# TODO(sterni): switch to pkgs.josh as soon as that commit is released
|
|
||||||
rev = "1586eab06284ce668779c87f00a1fb5fa9763be0";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "josh-project";
|
|
||||||
repo = "josh";
|
|
||||||
inherit rev;
|
|
||||||
hash = "sha256-94QrHcVHiEMCpBZJ5sghwtVNLNm4gdG8X85OetoGRD0=";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
naersk = pkgs.callPackage depot.third_party.sources.naersk {
|
|
||||||
inherit (pkgs) rustc cargo;
|
|
||||||
};
|
|
||||||
version = "git-${builtins.substring 0 8 rev}";
|
|
||||||
in
|
|
||||||
naersk.buildPackage {
|
|
||||||
pname = "josh";
|
|
||||||
inherit src version;
|
|
||||||
JOSH_VERSION = version;
|
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
libgit2
|
|
||||||
openssl
|
|
||||||
pkg-config
|
|
||||||
];
|
|
||||||
|
|
||||||
dontStrip = true;
|
|
||||||
cargoBuildOptions = x: x ++ [
|
|
||||||
"-p"
|
|
||||||
"josh-filter"
|
|
||||||
"-p"
|
|
||||||
"josh-proxy"
|
|
||||||
];
|
|
||||||
|
|
||||||
overrideMain = x: {
|
|
||||||
preBuild = x.preBuild or "" + ''
|
|
||||||
echo 'debug = true' >> Cargo.toml
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = (x.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
|
|
||||||
postInstall = ''
|
|
||||||
wrapProgram $out/bin/josh-proxy --prefix PATH : "${pkgs.git}/bin"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -17,7 +17,7 @@ in
|
||||||
|
|
||||||
command = pkgs.writeShellScript "${sanitizeDerivationName filter}-push" ''
|
command = pkgs.writeShellScript "${sanitizeDerivationName filter}-push" ''
|
||||||
set -e
|
set -e
|
||||||
export PATH="${makeBinPath [ pkgs.git depot.third_party.josh ]}:$PATH"
|
export PATH="${makeBinPath [ pkgs.git pkgs.josh ]}:$PATH"
|
||||||
|
|
||||||
echo 'Filtering depot through ${filter}'
|
echo 'Filtering depot through ${filter}'
|
||||||
josh-filter '${filter}'
|
josh-filter '${filter}'
|
||||||
|
|
|
@ -24,7 +24,6 @@ in
|
||||||
users.tazjin.chase-geese
|
users.tazjin.chase-geese
|
||||||
config.tazjin.emacs
|
config.tazjin.emacs
|
||||||
third_party.agenix.cli
|
third_party.agenix.cli
|
||||||
third_party.josh
|
|
||||||
]) ++
|
]) ++
|
||||||
|
|
||||||
# programs from nixpkgs
|
# programs from nixpkgs
|
||||||
|
@ -50,6 +49,7 @@ in
|
||||||
hyperfine
|
hyperfine
|
||||||
iftop
|
iftop
|
||||||
imagemagick
|
imagemagick
|
||||||
|
josh
|
||||||
jq
|
jq
|
||||||
lieer
|
lieer
|
||||||
maim
|
maim
|
||||||
|
|
Loading…
Reference in a new issue