add version to roc

This commit is contained in:
Daylin Morgan 2024-07-18 10:18:32 -05:00
parent 435d63b188
commit d49e0b044d
Signed by: daylin
GPG key ID: 950D13E9719334AD
2 changed files with 19 additions and 4 deletions

View file

@ -63,6 +63,11 @@ let
(substring 6 2 longDate)
]);
flakeVer =
flake:
"${flake.shortRev or flake.dirtyShortRev}-${mkDate (toString flake.lastModifiedDate)}";
isNixFile = p: hasSuffix ".nix" p;
isDefaultNixFile = p: hasSuffix "default.nix" p;
filterNotDefaultNixFile = paths: filter (p: !(isDefaultNixFile p) && (isNixFile p)) paths;
@ -81,5 +86,6 @@ in
mkIfIn
isNixFile
listNixFilesRecursive
flakeVer
;
}

View file

@ -6,14 +6,23 @@
...
}:
let
inherit (lib) mkIfIn;
inherit (lib) mkIfIn flakeVer;
version = flakeVer inputs.roc;
cfg = config.oizys.languages;
rocPkgs = inputs.roc.packages.${pkgs.system};
# I'm setting the versions so the changes are more apparent as flake is updated
roc = rocPkgs.cli.overrideAttrs {
inherit version;
};
lang-server = rocPkgs.lang-server.overrideAttrs {
inherit version;
};
in
{
config = mkIfIn "roc" cfg {
environment.systemPackages = with rocPkgs; [
full # cli + lang_server
];
environment.systemPackages = [roc lang-server];
};
}