Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use nix
use flake
5 changes: 4 additions & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ jobs:

- name: Install Nix
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
experimental-features = nix-command flakes

- name: Build
run: nix-shell --command "cargo build --verbose --release --target ${{ matrix.target }}"
run: nix develop --command cargo build --verbose --release --target ${{ matrix.target }}

- name: Strip binaries (Linux)
if: matrix.target == 'x86_64-unknown-linux-gnu'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ jobs:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Generate code coverage
run: nix-shell --command "cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info"
run: nix develop --command cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/hooky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ jobs:
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Execute hooks
run: nix-shell --command "hooky run --all --format=verbose"
run: nix develop --command hooky run --all --format=verbose
env:
SKIP: no_commit_to_branch
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
/.direnv
7 changes: 7 additions & 0 deletions .hooky.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ hook cargo_fmt {
files *.rs
}

hook nixpkgs_fmt {
command nixpkgs-fmt {
check_args --check
}
files *.nix
}

lint_rules {
- check_broken_symlinks
- check_case_conflict
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
description = "workingon - A Rust CLI for tracking what you're working on";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/83e29f2b8791f6dec20804382fcd9a666d744c07";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config = { };
overlays = [ ];
};
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
cargo
cargo-llvm-cov
clippy
hooky
nixpkgs-fmt
rust-analyzer
rustc
rustc.llvmPackages.llvm
rustfmt
sqlite
];

shellHook = ''
export LLVM_COV=${pkgs.llvm}/bin/llvm-cov
export LLVM_PROFDATA=${pkgs.llvm}/bin/llvm-profdata
'';
};
}
);
}
23 changes: 0 additions & 23 deletions shell.nix

This file was deleted.

Loading