Skip to content
Snippets Groups Projects
Commit 858f4937 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

nix: package

parent 751dfc3a
No related branches found
No related tags found
No related merge requests found
{
lib,
stdenv,
fetchFromGitHub,
cmake,
hpp-util,
}:
stdenv.mkDerivation {
pname = "hpp-statistics";
version = "5.0.0";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./CMakeLists.txt
./doc
./include
./package.xml
./src
./tests
];
};
strictDeps = true;
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ hpp-util ];
doCheck = true;
meta = {
description = "Classes for doing statistics";
homepage = "https://github.com/humanoid-path-planner/hpp-statistics";
license = lib.licenses.bsd2;
maintainers = [ lib.maintainers.nim65s ];
};
}
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
"nodes": { "nodes": {
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1717285511, "lastModified": 1717285511,
...@@ -18,6 +20,30 @@ ...@@ -18,6 +20,30 @@
"type": "github" "type": "github"
} }
}, },
"hpp-util": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1719580825,
"narHash": "sha256-trfl8A+P7a1gnACnTXNK98TYWWDAOM3PKfkXxpC3X/8=",
"owner": "humanoid-path-planner",
"repo": "hpp-util",
"rev": "0504f15818a92c7a257cd6b60cd8b6092bd6dbfa",
"type": "github"
},
"original": {
"owner": "humanoid-path-planner",
"ref": "release/5.1.0",
"repo": "hpp-util",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1719575122, "lastModified": 1719575122,
...@@ -34,21 +60,10 @@ ...@@ -34,21 +60,10 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1717284937,
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"hpp-util": "hpp-util",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }
......
{ {
description = "Description for the project"; description = "Classes for doing statistics";
nixConfig = {
extra-substituters = [ "https://gepetto.cachix.org" ];
extra-trusted-public-keys = [ "gepetto.cachix.org-1:toswMl31VewC0jGkN6+gOelO2Yom0SOHzPwJMY2XiDY=" ];
};
inputs = { inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:nim65s/nixpkgs/gepetto"; nixpkgs.url = "github:nim65s/nixpkgs/gepetto";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
hpp-util = {
url = "github:humanoid-path-planner/hpp-util/release/5.1.0";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
};
}; };
outputs = outputs =
inputs@{ flake-parts, ... }: inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ imports = [ ];
# To import a flake module
# 1. Add foo to inputs
# 2. Add foo as a parameter to the outputs function
# 3. Add here: foo.flakeModule
];
systems = [ systems = [
"x86_64-linux" "x86_64-linux"
"aarch64-linux" "aarch64-linux"
...@@ -24,26 +31,16 @@ ...@@ -24,26 +31,16 @@
]; ];
perSystem = perSystem =
{ {
config,
self', self',
inputs',
pkgs,
system, system,
pkgs,
... ...
}: }:
{ {
# Per-system attributes can be defined here. The self' and inputs' packages.default = pkgs.callPackage ./. {
# module parameters provide easy access to attributes of the same hpp-util = inputs.hpp-util.packages.${system}.default;
# system. };
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
packages.default = pkgs.hello;
}; };
flake = {
# The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem.
};
}; };
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment