Skip to content

Commit a57908b

Browse files
committed
Update template from comments
1 parent deee356 commit a57908b

File tree

6 files changed

+41
-42
lines changed

6 files changed

+41
-42
lines changed

templates/simple/dune-project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(lang dune 3.0)
1+
(lang dune 3.8)
File renamed without changes.

templates/simple/flake.nix

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
let pkgs = nixpkgs.legacyPackages.${system}; in
1717
{
1818
packages = {
19-
inherit (pkgs.ocamlPackages.callPackage ./nix {
19+
default = pkgs.callPackage ./nix {
2020
inherit nix-filter;
2121
doCheck = true;
22-
}) package;
22+
};
2323
};
2424

2525
devShells = {
2626
default = pkgs.mkShell {
27-
inputsFrom = with self.packages.${system}; [
28-
package
27+
inputsFrom = [
28+
self.packages.${system}.default
2929
];
3030

3131
nativeBuildInputs = with pkgs.ocamlPackages; [

templates/simple/nix/default.nix

+32-33
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,43 @@
66
, static ? false
77
, doCheck
88
}:
9-
with ocamlPackages; {
10-
package = buildDunePackage {
11-
pname = "package";
12-
version = "1.0.0";
9+
with ocamlPackages;
10+
buildDunePackage {
11+
pname = "example";
12+
version = "1.0.0";
1313

14-
src = with nix-filter.lib;
15-
filter {
16-
# Root of the project relative to this file
17-
root = ./..;
18-
# If no include is passed, it will include all the paths.
19-
include = [
20-
# Include the "src" path relative to the root.
21-
"src"
22-
"test"
23-
# Include this specific path. The path must be under the root.
24-
../package.opam
25-
../dune-project
26-
];
27-
};
14+
src = with nix-filter.lib;
15+
filter {
16+
# Root of the project relative to this file
17+
root = ./..;
18+
# If no include is passed, it will include all the paths.
19+
include = [
20+
# Include the "src" path relative to the root.
21+
"src"
22+
"test"
23+
# Include this specific path. The path must be under the root.
24+
../example.opam
25+
../dune-project
26+
];
27+
};
2828

29-
checkInputs = [
30-
# Put test dependencies here
31-
alcotest
32-
];
29+
checkInputs = [
30+
# Put test dependencies here
31+
alcotest
32+
];
3333

34-
propagatedBuildInputs = [
35-
# Put dependencies here if you're creating a library
36-
];
34+
propagatedBuildInputs = [
35+
# Put dependencies here if you're creating a library
36+
];
3737

38-
buildInputs = [
39-
# Put build-time dependencies here
40-
];
38+
buildInputs = [
39+
# Put build-time dependencies here
40+
];
4141

42-
inherit doCheck;
42+
inherit doCheck;
4343

44-
meta = {
45-
description = "Describe your project here";
46-
# license = stdenv.lib.licenses.bsd3;
47-
};
44+
meta = {
45+
description = "Describe your project here";
46+
# license = stdenv.lib.licenses.bsd3;
4847
};
4948
}

templates/simple/src/bin/dune

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
(executable
22
(name main)
3-
(public_name package)
4-
(libraries package))
3+
(public_name example)
4+
(libraries example))

templates/simple/src/lib/dune

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
(library
2-
(name package)
3-
(public_name package))
2+
(name example)
3+
(public_name example))

0 commit comments

Comments
 (0)