Skip to content

Commit

Permalink
Add nix flake using naersk
Browse files Browse the repository at this point in the history
  • Loading branch information
crisidev committed Jan 9, 2025
1 parent fa46181 commit 444e70a
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ target/
bundled/
vscode/extension.js.*
bacon-ls.log
result
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bacon-ls"
version = "0.9.0"
version = "0.10.0-dev"
edition = "2021"
authors = ["Matteo Bigoi <[email protected]>"]
description = "Bacon Language Server"
Expand Down
94 changes: 94 additions & 0 deletions flake.lock

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

29 changes: 29 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};

outputs = { self, flake-utils, naersk, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs) {
inherit system;
};

naersk' = pkgs.callPackage naersk {};

in rec {
# For `nix build` & `nix run`:
defaultPackage = naersk'.buildPackage {
src = ./.;
};

# For `nix develop`:
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ rustc cargo ];
};
}
);
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Bacon Language Server",
"description": "Rust diagnostic based on Bacon",
"publisher": "MatteoBigoi",
"version": "0.9.0",
"version": "0.10.0-dev",
"private": true,
"icon": "img/icon.png",
"repository": {
Expand Down

0 comments on commit 444e70a

Please sign in to comment.