Skip to content

Instantly share code, notes, and snippets.

View drupol's full-sized avatar

Pol Dellaiera drupol

View GitHub Profile
@drupol
drupol / flake.nix
Last active November 4, 2023 08:54
flake.nix using devenv
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
phps.url = "github:fossar/nix-phps";
devenv.url = "github:cachix/devenv";
systems.url = "github:nix-systems/default";
};
outputs = inputs @ { self, flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
@drupol
drupol / python311-venv.nix
Created October 13, 2023 12:18
Python 3.11 with venv and oracledb
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "python-3.11-pip";
targetPkgs = pkgs: (with pkgs; [
python311
python311Packages.pip
python311Packages.virtualenv
python311Packages.oracledb
]);
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
php-src-master = {
url = "github:php/php-src/master";
flake = false;
};
php-src-81 = {
url = "github:php/php-src/PHP-8.1";
@drupol
drupol / flake.nix
Last active September 19, 2023 07:41
flake.nix
```nix
packages = let
src = ./.;
php = pkgs.php81;
in {
app = php.buildComposerProject {
inherit src;
pname = "app-demo";
version = "1.0.0";
@drupol
drupol / flake.nix
Last active September 12, 2023 14:50
Flake providing all the PHP version from PHP >= 8
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
flake-compat.url = "github:nix-community/flake-compat";
php-active = {
url = "https://www.php.net/releases/active";
flake = false;
};
};
@drupol
drupol / flake.nix
Last active September 8, 2023 21:08
Build PHP >= 8 from https://github.com/php/php-src with Nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
pear = {
url = "https://pear.php.net/install-pear-nozlib.phar";
flake = false;
};
};
@drupol
drupol / default.nix
Last active August 19, 2023 19:41
Enemy Territory Legacy on Nix
{ stdenv
, lib
, makeBinaryWrapper
, fetchFromGitHub
, fetchurl
, cmake
, glew
, SDL2
, zlib
, minizip
@drupol
drupol / .gitlab-ci.yml
Last active August 3, 2023 15:24
Playing with Nix on Gitlab CI
---
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/nixos/nix:2.17.0
variables:
COMPOSER_ALLOW_SUPERUSER: 1
default:
before_script:
- echo experimental-features = nix-command flakes >> /etc/nix/nix.conf
- echo access-tokens = github.com=${GITHUB_TOKEN} >> /etc/nix/nix.conf
@drupol
drupol / flake.nix
Created August 1, 2023 12:48
Example flake.nix for N.L.
{
description = "My custom shell env";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
@drupol
drupol / flake.nix
Created July 4, 2023 07:30
Flake for Symfony app
{
description = "PHP App demo";
inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.phps.url = "github:loophp/nix-shell";
outputs = { self, nixpkgs, flake-utils, phps }: flake-utils.lib.eachDefaultSystem
(system:
let