mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-09 16:23:15 -06:00
add version to roc
This commit is contained in:
parent
435d63b188
commit
d49e0b044d
2 changed files with 19 additions and 4 deletions
|
@ -63,6 +63,11 @@ let
|
||||||
(substring 6 2 longDate)
|
(substring 6 2 longDate)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
flakeVer =
|
||||||
|
flake:
|
||||||
|
"${flake.shortRev or flake.dirtyShortRev}-${mkDate (toString flake.lastModifiedDate)}";
|
||||||
|
|
||||||
|
|
||||||
isNixFile = p: hasSuffix ".nix" p;
|
isNixFile = p: hasSuffix ".nix" p;
|
||||||
isDefaultNixFile = p: hasSuffix "default.nix" p;
|
isDefaultNixFile = p: hasSuffix "default.nix" p;
|
||||||
filterNotDefaultNixFile = paths: filter (p: !(isDefaultNixFile p) && (isNixFile p)) paths;
|
filterNotDefaultNixFile = paths: filter (p: !(isDefaultNixFile p) && (isNixFile p)) paths;
|
||||||
|
@ -81,5 +86,6 @@ in
|
||||||
mkIfIn
|
mkIfIn
|
||||||
isNixFile
|
isNixFile
|
||||||
listNixFilesRecursive
|
listNixFilesRecursive
|
||||||
|
flakeVer
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,14 +6,23 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkIfIn;
|
inherit (lib) mkIfIn flakeVer;
|
||||||
|
|
||||||
|
version = flakeVer inputs.roc;
|
||||||
cfg = config.oizys.languages;
|
cfg = config.oizys.languages;
|
||||||
rocPkgs = inputs.roc.packages.${pkgs.system};
|
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
|
in
|
||||||
{
|
{
|
||||||
config = mkIfIn "roc" cfg {
|
config = mkIfIn "roc" cfg {
|
||||||
environment.systemPackages = with rocPkgs; [
|
environment.systemPackages = [roc lang-server];
|
||||||
full # cli + lang_server
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue