dev: Switch from mission-control to just

This commit is contained in:
Sridhar Ratnakumar 2023-07-19 18:33:15 -04:00 committed by Sridhar Ratnakumar
parent f95d5dacaa
commit 838cc5682a
3 changed files with 17 additions and 34 deletions

View File

@ -33,21 +33,6 @@
"type": "github"
}
},
"mission-control": {
"locked": {
"lastModified": 1683658484,
"narHash": "sha256-JkGnWyYZxOnyOhztrxLSqaod6+O/3rRypq0dAqA/zn0=",
"owner": "Platonic-Systems",
"repo": "mission-control",
"rev": "a0c93bd764a3c25e6999397e9f5f119c1b124e38",
"type": "github"
},
"original": {
"owner": "Platonic-Systems",
"repo": "mission-control",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1687274257,
@ -102,7 +87,6 @@
"inputs": {
"flake-parts": "flake-parts",
"flake-root": "flake-root",
"mission-control": "mission-control",
"nixpkgs": "nixpkgs",
"treefmt-nix": "treefmt-nix"
}

View File

@ -3,7 +3,6 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-root.url = "github:srid/flake-root";
mission-control.url = "github:Platonic-Systems/mission-control";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
@ -11,7 +10,6 @@
systems = nixpkgs.lib.systems.flakeExposed;
imports = [
inputs.flake-root.flakeModule
inputs.mission-control.flakeModule
inputs.treefmt-nix.flakeModule
];
perSystem = { pkgs, lib, config, ... }: {
@ -21,23 +19,14 @@
nixpkgs-fmt.enable = true;
};
};
mission-control.scripts = {
ex = {
description = "Run example";
exec = "cd ./example && nix run . --override-input services-flake ..";
};
test = {
description = "Run test";
exec = "./test.sh";
};
fmt = {
description = "Format all Nix files";
exec = config.treefmt.build.wrapper;
};
};
devShells.default = pkgs.mkShell {
# cf. https://haskell.flake.page/devshell#composing-devshells
inputsFrom = [ config.mission-control.devShell ];
nativeBuildInputs = [
pkgs.just
];
# cf. https://zero-to-flakes.com/haskell-flake/devshell#composing-devshells
inputsFrom = [
config.treefmt.build.devShell
];
};
};
};

10
justfile Normal file
View File

@ -0,0 +1,10 @@
default:
@just --list
# Run example
ex:
cd ./example && nix run . --override-input services-flake ..
# Auto-format the project tree
fmt:
treefmt