Update dependencies

This commit is contained in:
niten 2022-08-22 09:30:34 -07:00
parent 72d3613970
commit 903d1b81d1
3 changed files with 34 additions and 30 deletions

View File

@ -76,16 +76,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1655278232,
"narHash": "sha256-H6s7tnHYiDKFCcLADS4sl1sUq0dDJuRQXCieguk/6SA=",
"lastModified": 1659446231,
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8b538fcb329a7bc3d153962f17c509ee49166973",
"rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.05",
"ref": "nixos-21.11",
"type": "indirect"
}
},

View File

@ -2,7 +2,7 @@
description = "Fudo Coinbase Price Bot.";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
nixpkgs.url = "nixpkgs/nixos-21.11";
utils.url = "github:numtide/flake-utils";
clj-nix = {
url = "github:jlesquembre/clj-nix";
@ -11,28 +11,33 @@
};
outputs = { self, nixpkgs, utils, clj-nix, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages."${system}";
cljpkgs = clj-nix.packages."${system}";
update-deps = pkgs.writeShellScriptBin "update-deps.sh" ''
${clj-nix.packages."${system}".deps-lock}/bin/deps-lock
'';
in {
packages."${system}".fudo-pricebot = cljpkgs.mkCljBin {
projectSrc = ./.;
name = "org.fudo/pricebot";
main-ns = "pricebot.core";
jdkRunner = pkgs.jdk17_headless;
version = "0.1";
utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages."${system}";
mkCljBin = clj-nix.packages."${system}".mkCljBin;
update-deps = pkgs.writeShellScriptBin "update-deps.sh" ''
${clj-nix.packages."${system}".deps-lock}/bin/deps-lock
'';
in {
packages = rec {
fudo-pricebot = mkCljBin {
projectSrc = ./.;
name = "org.fudo/pricebot";
main-ns = "pricebot.core";
jdkRunner = pkgs.jdk17_headless;
version = "0.1";
};
default = fudo-pricebot;
};
legacyPackages = {
fudo-pricebot = self.packages."${system}".fudo-pricebot;
};
devShells.default =
pkgs.mkShell { buildInputs = with pkgs; [ update-deps ]; };
}) // {
nixosModules.default = import ./module.nix;
};
defaultPackage."${system}" = self.packages."${system}".fudo-pricebot;
nixosModule =
pkgs.callPackage ./module.nix self.packages."${system}".fudo-pricebot;
devShell."${system}" =
pkgs.mkShell { buildInputs = with pkgs; [ clojure update-deps ]; };
};
}

View File

@ -1,4 +1,3 @@
pricebot:
{ config, lib, pkgs, ... }:
with lib;
@ -68,7 +67,7 @@ in {
};
serviceConfig = {
ExecStart = pkgs.writeShellScript "launch-pricebot-${currency}.sh" ''
${pricebot}/bin/pricebot --bebot-auth-token-file=$CREDENTIALS_DIRECTORY/auth.token
${pkgs.pricebot}/bin/pricebot --bebot-auth-token-file=$CREDENTIALS_DIRECTORY/auth.token
'';
DynamicUser = true;
PrivateTmp = true;