-
Notifications
You must be signed in to change notification settings - Fork 7
/
flake.nix
38 lines (33 loc) · 1.1 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
description = "opp_env: A Tool for Automated Installation of OMNeT++ Simulation Frameworks";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils}:
flake-utils.lib.eachDefaultSystem(system:
let
pkgs = import nixpkgs { inherit system; };
pname = "opp_env";
version = "0.31.2.241127"; # Latest released version. Must be updated regularly.
githash = self.shortRev or "dirty";
timestamp = nixpkgs.lib.substring 0 8 self.lastModifiedDate;
gversion = "${githash}.${timestamp}";
in {
packages = rec {
opp_env = pkgs.callPackage ./default.nix {
inherit pname version;
src = pkgs.python3Packages.fetchPypi {
inherit pname version;
hash = "sha256-IzXZN0jA0xgKQWj/e3IJxpByHSbsJ5riXu+w0QcujAg=";
};
};
opp_env-git = pkgs.callPackage ./default.nix {
pname = "${pname}-git";
version = "0+${gversion}";
src = ./.;
};
default = opp_env;
};
});
}