Some generic questions about using Nix for development environments

Works for me, I had to compile Apache Modules that only works with Apache of 2.2.22

{
  description = "Dev Environment";

  inputs.dsf.url     = "github:cruel-intentions/devshell-files";
  inputs.nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
  inputs.nixolds.url = "github:nixos/nixpkgs/0.14";
  inputs.nixolds.flake = false;
  inputs.dsf.inputs.nixpkgs.follows = "nixpkgs";

  outputs = inputs:
    inputs.dsf.lib.shell inputs [
      # my devShell config using nixolds and nixpkgs
      ./project.nix 
    ] //
    { # my package using nixolds
      packages.x86_64-linux.default = inputs.nixpkgs.legacyPackages.x86_64-linux.callPackage ./default.nix {
        pkgsold =  import inputs.nixolds {
          system = "x86_64-linux";
        };
      };
    };
}

default.nix

{
  pkgs         ? import <nixpkgs>,
  pkgsold      ? pkgs,
}:
let
  apacheHttpd  = pkgsold.apacheHttpd;
  libxml2      = pkgsold.libxml2;
  openssl      = pkgsold.openssl;
  pkg-config   = pkgsold.pkgconfig;
  sasl         = pkgsold.cyrus_sasl;
in
pkgsold.stdenv.mkDerivation {
}

try
NixHub to find old versions or Marcelo Tool

1 Like