Fix linuxcnc-ethercat
This commit is contained in:
70
flake.lock
generated
70
flake.lock
generated
@@ -1,5 +1,24 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"etherlab": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1692255291,
|
||||||
|
"narHash": "sha256-JB3M8OvT5QXqbAjVSGOWKm+X7SCxsk7sbAPVQNdlMJo=",
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"rev": "ec418a9f2fb9094be93f2d6870113a388cd62a06",
|
||||||
|
"revCount": 7,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.dripco.eu/nic/etherlab-nix"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.dripco.eu/nic/etherlab-nix"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -16,7 +35,40 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689068808,
|
||||||
|
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1692025715,
|
||||||
|
"narHash": "sha256-tsRiiopGT7HA8d/cuk5xYBRXgdnnvD+JhUGUe3x7vmY=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "09a137528c3aea3780720d19f99cd706f52c3823",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-23.05",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1653845079,
|
"lastModified": 1653845079,
|
||||||
"narHash": "sha256-7ghaQZ+7JXLI9FgNH8+RQHAt3/ubT92j8NtjZleP6t4=",
|
"narHash": "sha256-7ghaQZ+7JXLI9FgNH8+RQHAt3/ubT92j8NtjZleP6t4=",
|
||||||
@@ -33,8 +85,24 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"etherlab": "etherlab",
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,14 +2,17 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
|
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
|
||||||
|
|
||||||
|
etherlab.url = "git+https://git.dripco.eu/nic/etherlab-nix";
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs, flake-compat }@inputs:
|
outputs = { self, nixpkgs, flake-compat, etherlab }@inputs:
|
||||||
let
|
let
|
||||||
|
etherlab-pkgs = system: etherlab.packages.${system};
|
||||||
systems = nixpkgs.lib.platforms.linux;
|
systems = nixpkgs.lib.platforms.linux;
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
packagePaths = lib.mapAttrs (n: v: "${./packages}/${n}") (lib.filterAttrs (n: v: v == "directory" && (builtins.readDir "${./packages}/${n}") ? "default.nix") (builtins.readDir ./packages));
|
packagePaths = lib.mapAttrs (n: v: "${./packages}/${n}") (lib.filterAttrs (n: v: v == "directory" && (builtins.readDir "${./packages}/${n}") ? "default.nix") (builtins.readDir ./packages));
|
||||||
in rec {
|
in rec {
|
||||||
packages = lib.genAttrs systems (system: lib.mapAttrs (n: v: lib.callPackageWith ((lib.recursiveUpdate packages.${system} nixpkgs.legacyPackages.${system}) // { inherit inputs; inherit system; }) v {}) packagePaths);
|
packages = lib.genAttrs systems (system: lib.mapAttrs (n: v: lib.callPackageWith ((lib.recursiveUpdate packages.${system} nixpkgs.legacyPackages.${system}) // { inherit inputs; inherit system; etherlab = (etherlab-pkgs system); }) v {}) packagePaths);
|
||||||
legacyPackages = packages;
|
legacyPackages = packages;
|
||||||
overlay = final: prev: (lib.mapAttrs (n: v: prev.callPackage v { }) packagePaths);
|
overlay = final: prev: (lib.mapAttrs (n: v: prev.callPackage v { }) packagePaths);
|
||||||
nixosModules = { linuxcnc = import ./modules/linuxcnc.nix; };
|
nixosModules = { linuxcnc = import ./modules/linuxcnc.nix; };
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, stdenv, linuxcnc, fetchGit }:
|
{ config, lib, pkgs, stdenv, linuxcnc, etherlab }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
enableParalellBuilding = true;
|
enableParalellBuilding = true;
|
||||||
@@ -7,15 +7,17 @@ stdenv.mkDerivation rec {
|
|||||||
version = "5ad53da25b";
|
version = "5ad53da25b";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchGit {
|
src = pkgs.fetchgit {
|
||||||
url = "https://git.dripco.eu/nic/linuxcnc-ethercat.git";
|
url = "https://git.dripco.eu/nic/linuxcnc-ethercat.git";
|
||||||
ref = "master";
|
|
||||||
rev = "5ad53da25bdb5633e39ae1b9b8bfa9e5acb10674";
|
rev = "5ad53da25bdb5633e39ae1b9b8bfa9e5acb10674";
|
||||||
#ref = "refs/tags/1.9";
|
sha256 = "SjFkcNl/4AlsMeIw5Hg9Kp5mIIV9KFUYodXV6lAi3/A=";
|
||||||
#sha256 = lib.fakeSha256;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ linuxcnc ];
|
nativeBuildInputs = with pkgs; [ which expat ];
|
||||||
|
|
||||||
|
buildInputs = [ linuxcnc etherlab.ethercat ];
|
||||||
|
|
||||||
|
installFlags = [ "DESTDIR=${placeholder "out"}" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "LinuxCNC ethercat interop";
|
description = "LinuxCNC ethercat interop";
|
||||||
|
|||||||
Reference in New Issue
Block a user