From 42f059bf661eb960461178451fba0b7aae484bf7 Mon Sep 17 00:00:00 2001 From: Milo Moisson Date: Sun, 22 Dec 2024 22:03:48 +0100 Subject: [PATCH] feat(pkgs): bundle ebnfer --- home-manager/fragments/jujutsu.nix | 4 ++-- pkgs/default.nix | 1 + pkgs/ebnfer.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 pkgs/ebnfer.nix diff --git a/home-manager/fragments/jujutsu.nix b/home-manager/fragments/jujutsu.nix index 2b3f94d..98c52de 100644 --- a/home-manager/fragments/jujutsu.nix +++ b/home-manager/fragments/jujutsu.nix @@ -19,7 +19,7 @@ in programs.jujutsu = { enable = true; package = if flags.onlyCached then pkgs.jujutsu else lpkgs.jujutsu; - + settings = { user = { name = "Milo Moisson"; @@ -43,7 +43,7 @@ in }; aliases = { - ui = ["util" "exec" "--" "lazyjj"]; + ui = [ "util" "exec" "--" "lazyjj" ]; }; }; }; diff --git a/pkgs/default.nix b/pkgs/default.nix index 59e416d..2d3bd69 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -6,6 +6,7 @@ in { asak = pkgs.callPackage ./asak.nix { }; cura = pkgs.callPackage ./cura.nix { }; + ebnfer = pkgs.callPackage ./ebnfer.nix { }; find-unicode = pkgs.callPackage ./find-unicode.nix { }; # lazyjj = pkgs.callPackage ./lazyjj.nix { }; names = pkgs.callPackage ./names.nix { }; diff --git a/pkgs/ebnfer.nix b/pkgs/ebnfer.nix new file mode 100644 index 0000000..5231d15 --- /dev/null +++ b/pkgs/ebnfer.nix @@ -0,0 +1,29 @@ +{ lib + +, fetchFromGitHub +, rustPlatform +}: + +rustPlatform.buildRustPackage rec { + pname = "ebnfer"; + version = "0.14.0"; + + src = fetchFromGitHub { + owner = "DanielHauge"; + repo = pname; + # rev = "v${version}"; + rev = "f1c3a506859f6b62e14b898f5b5e59781dfe3278"; + hash = "sha256-CSe2HCToYW7ivH6jpJwqHKH/yZDZgW8el8FVCmq75cU="; + }; + + cargoHash = "sha256-URT4jTKkCkK7Mr94ll1DloSEcrbkUJk8HFxkTmePf/w="; + + meta = with lib; { + description = "A language server for EBNF"; + homepage = "https://github.com/DanielHauge/ebnfer"; + # license = licenses.mit; + maintainers = [ "mrnossiom" ]; + mainProgram = "ebnfer"; + }; +} +