Compare commits

..

No commits in common. "e513b6e6a6d8621713a791371980972b651ab00c" and "76e06049cffed82283cff181af424f5e1536d603" have entirely different histories.

5 changed files with 40 additions and 60 deletions

View file

@ -1,8 +0,0 @@
image: nixos/unstable
environment:
NIX_CONFIG: "experimental-features = nix-command flakes"
packages:
- cachix
tasks:
-build: |
nix build . -vL --no-out-link

View file

@ -16,7 +16,7 @@ let main = () => {
switch (Util.hash_files(paths)) { switch (Util.hash_files(paths)) {
| Ok(hsh) => hsh | Ok(hsh) => hsh
| Error(msg) => | Error(msg) =>
Printf.eprintf("%s\n", msg); Printf.eprintf("%s\n", e);
exit(1); exit(1);
}; };

View file

@ -1,5 +1,4 @@
{ alcotest { alcotest
, bintools
, bisect_ppx , bisect_ppx
, buildDunePackage , buildDunePackage
, core , core
@ -14,7 +13,6 @@
, re , re
, reason , reason
, sha , sha
, upx
, ,
}: }:
buildDunePackage { buildDunePackage {
@ -32,6 +30,7 @@ buildDunePackage {
./flake.lock ./flake.lock
./flake_env.opam ./flake_env.opam
./direnvrc ./direnvrc
./LICENSE
]; ];
}; };
duneVersion = "3"; duneVersion = "3";
@ -41,20 +40,11 @@ buildDunePackage {
substituteInPlace tests/spit*.sh --replace "/usr/bin/env" "${coreutils}/bin/env" substituteInPlace tests/spit*.sh --replace "/usr/bin/env" "${coreutils}/bin/env"
''; '';
postInstall = '' postInstall = ''
${bintools}/bin/strip --strip-unneeded $out/bin/flake_env
${upx}/bin/upx $out/bin/flake_env
install -m400 -D direnvrc $out/share/flake_env/direnvrc install -m400 -D direnvrc $out/share/flake_env/direnvrc
''; '';
buildInputs = [
core
core_unix
ppx_yojson_conv
ppx_yojson_conv_lib
re
sha
];
checkInputs = [ alcotest bisect_ppx ]; checkInputs = [ alcotest bisect_ppx ];
nativeBuildInputs = [ reason ]; nativeBuildInputs = [ reason ];
propagatedBuildInputs = [ core core_unix findlib ocaml ppx_yojson_conv ppx_yojson_conv_lib re sha ];
meta = with lib; { meta = with lib; {
description = "Yet another flake plugin for direnv"; description = "Yet another flake plugin for direnv";

48
flake.lock generated
View file

@ -23,11 +23,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1709336216, "lastModified": 1701473968,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=", "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2", "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,11 +41,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1701680307,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -62,11 +62,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1709087332, "lastModified": 1703887061,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "gitignore.nix", "repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -77,11 +77,11 @@
}, },
"nix-filter": { "nix-filter": {
"locked": { "locked": {
"lastModified": 1710156097, "lastModified": 1701697642,
"narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", "narHash": "sha256-L217WytWZHSY8GW9Gx1A64OnNctbuDbfslaTEofXXRw=",
"owner": "numtide", "owner": "numtide",
"repo": "nix-filter", "repo": "nix-filter",
"rev": "3342559a24e85fc164b295c3444e8a139924675b", "rev": "c843418ecfd0344ecb85844b082ff5675e02c443",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -92,11 +92,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1711106783, "lastModified": 1702272962,
"narHash": "sha256-PDwAcHahc6hEimyrgGmFdft75gmLrJOZ0txX7lFqq+I=", "narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a3ed7406349a9335cb4c2a71369b697cecd9d351", "rev": "e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -108,11 +108,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1710695816, "lastModified": 1704874635,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "614b4613980a522ba49f0d194531beddbb7220d3", "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -124,11 +124,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1710765496, "lastModified": 1704842529,
"narHash": "sha256-p7ryWEeQfMwTB6E0wIUd5V2cFTgq+DRRBz2hYGnJZyA=", "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e367f7a1fb93137af22a3908f00b9a35e2d286a7", "rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -147,11 +147,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1710923068, "lastModified": 1705229514,
"narHash": "sha256-6hOpUiuxuwpXXc/xfJsBUJeqqgGI+JMJuLo45aG3cKc=", "narHash": "sha256-itILy0zimR/iyUGq5Dgg0fiW8plRDyxF153LWGsg3Cw=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "e611897ddfdde3ed3eaac4758635d7177ff78673", "rev": "ffa9a5b90b0acfaa03b1533b83eaf5dead819a05",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -39,21 +39,19 @@
}; };
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
inputsFrom = [ self'.packages.default ]; inputsFrom = [ self'.packages.default ];
packages = builtins.attrValues { packages = [
inherit (pkgs) pkgs.just
just pkgs.rnix-lsp
nil pkgs.pre-commit
pre-commit pkgs.ocamlPackages.alcotest
; pkgs.ocamlPackages.bisect_ppx
inherit (pkgs.ocamlPackages) pkgs.ocamlPackages.dune_3
dune_3 pkgs.ocamlPackages.findlib
findlib pkgs.ocamlPackages.ocaml
ocaml pkgs.ocamlPackages.ocaml-lsp
ocaml-lsp pkgs.ocamlPackages.ocamlformat
ocamlformat pkgs.ocamlPackages.ocamlformat-rpc-lib
ocamlformat-rpc-lib ];
;
};
shellHook = config.pre-commit.installationScript; shellHook = config.pre-commit.installationScript;
}; };
pre-commit = { pre-commit = {