From 141cd8868c5557448ce2324c2db9bfe925cf713b Mon Sep 17 00:00:00 2001 From: Victor Moene Date: Mon, 7 Sep 2026 10:26:06 +0200 Subject: [PATCH] Revert "Added flake to build cfengine locally" This reverts commit 70424f16d6ae55c4485f501d7d3993e0a477a832. --- .gitignore | 3 -- contrib/nix/cf-agent | 6 ---- contrib/nix/core.nix | 75 ------------------------------------------ contrib/nix/flake.lock | 61 ---------------------------------- contrib/nix/flake.nix | 33 ------------------- 5 files changed, 178 deletions(-) delete mode 100644 contrib/nix/cf-agent delete mode 100644 contrib/nix/core.nix delete mode 100644 contrib/nix/flake.lock delete mode 100644 contrib/nix/flake.nix diff --git a/.gitignore b/.gitignore index a2379da89ad..ff74fda4594 100644 --- a/.gitignore +++ b/.gitignore @@ -194,6 +194,3 @@ misc/selinux/cfengine-enterprise.pp misc/selinux/cfengine-enterprise.if misc/selinux/cfengine-enterprise.te misc/selinux/tmp - -# nix -contrib/nix/result diff --git a/contrib/nix/cf-agent b/contrib/nix/cf-agent deleted file mode 100644 index c072e5f87f4..00000000000 --- a/contrib/nix/cf-agent +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -e -WORKDIR=/tmp/cfengine-test-workdir -mkdir -p "$WORKDIR/bin" -cp ./result/bin/* "$WORKDIR/bin/" -sudo CFENGINE_TEST_OVERRIDE_WORKDIR="$WORKDIR" ./result/bin/cf-agent "$@" diff --git a/contrib/nix/core.nix b/contrib/nix/core.nix deleted file mode 100644 index 89fb5eec284..00000000000 --- a/contrib/nix/core.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ stdenv -, version -, is-enterprise -, is-hub -, lib -, pkg-config -, autoreconfHook -, bison -, flex -, diffutils -, coreutils -, acl -, attr -, curl -, libxml2 -, libyaml -, lmdb -, openssl -, pcre2 -, zlib -, librsync -, pam -, perl -, shadow -}: - -stdenv.mkDerivation { - pname = "cfengine"; - version = version; - src = ../../.; - - postPatch = '' - echo "${version}" > CFVERSION - ''; - - preBuild = '' - patchShebangs . - ''; - - nativeBuildInputs = [ - pkg-config - autoreconfHook - bison - flex - diffutils - perl - shadow - ]; - - buildInputs = [ - acl - attr - curl - libxml2 - libyaml - lmdb - openssl - pcre2 - zlib - pam - librsync - ]; - - enableParallelBuilding = true; - - configureFlags = [ - "--with-lmdb" - "--enable-debug" - ]; - - postInstall = '' - cp ${coreutils}/bin/date $out/bin/date - cp ${diffutils}/bin/diff $out/bin/diffutils - ''; -} diff --git a/contrib/nix/flake.lock b/contrib/nix/flake.lock deleted file mode 100644 index 4028206977f..00000000000 --- a/contrib/nix/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1788179007, - "narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "34ab99075ac4f7e40cf037eef32cb1c360bb85e9", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/contrib/nix/flake.nix b/contrib/nix/flake.nix deleted file mode 100644 index 53f6e8d8c72..00000000000 --- a/contrib/nix/flake.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - description = "A multi-platform dev shell using flake-utils"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; - self.submodules = true; - }; - - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = nixpkgs.legacyPackages.${system}; - lib = pkgs.lib; - - baseVersion = lib.strings.trim (builtins.readFile ./../../.CFVERSION); - - shortSha = - if self ? rev then builtins.substring 0 9 self.rev - else if self ? dirtyRev then builtins.substring 0 9 self.dirtyRev - else "unknown0"; - - version = "${baseVersion}a.${shortSha}"; - in - { - packages = { - community-agent = pkgs.callPackage ./core.nix { version = version; is-enterprise = false; is-hub = false; }; - enterprise-agent = pkgs.callPackage ./core.nix { version = version; is-enterprise = true; is-hub = false; }; - enterprise-hub = pkgs.callPackage ./core.nix { version = version; is-enterprise = true; is-hub = true; }; - }; - } - ); -}