42 lines
962 B
Nix
42 lines
962 B
Nix
{
|
|
description = "nbb TUI Habits Tracker compatible with uHabits (android)";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs";
|
|
};
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
in
|
|
{
|
|
|
|
packages.x86_64-linux.nbb-habits = pkgs.stdenv.mkDerivation {
|
|
name = "nbb-habits";
|
|
src = ./.;
|
|
# Need node_modules here
|
|
# Probably need some sort of wrapper of the bin too
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp -r src/ $out/
|
|
cp nbb.edn $out/
|
|
'';
|
|
};
|
|
|
|
defaultPackage.x86_64-linux = self.packages.x86_64-linux.nbb-habits;
|
|
devShell.x86_64-linux = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
jdk11
|
|
nodejs
|
|
babashka
|
|
clojure
|
|
];
|
|
shellHook = ''
|
|
alias nbb='./node_modules/.bin/nbb'
|
|
alias run='nbb src/habits/index.cljs'
|
|
'';
|
|
};
|
|
};
|
|
}
|
|
|