Hai questo problema, diciamo che test/shell.nix
sia:
{ pkgs ? import <nixpkgs> {} }:
with pkgs; mkShell { buildInputs = [ pkgs.hello ]; }
tu fai:
> cd test
test> hello
Hai questo problema, diciamo che test/shell.nix
sia:
{ pkgs ? import <nixpkgs> {} }:
with pkgs; mkShell { buildInputs = [ pkgs.hello ]; }
tu fai:
> cd test
test> hello
{-# LANGUAGE DeriveGeneric, TypeApplications, DataKinds, TypeOperators, | |
DerivingStrategies, GeneralizedNewtypeDeriving, UndecidableInstances #-} | |
module Inconsistency where | |
import Data.Text (Text) | |
import qualified GHC.Generics as GHC | |
import Generic.Data.Surgery | |
import Generic.Data.Surgery.Internal | |
import Fcf |
hardware.pulseaudio.package = pkgs.pulseaudio.override { jackaudioSupport = true; }; |
{ stdenv, fetchurl, makeWrapper, pkgconfig, MMA, libjack2, libsmf, python2Packages, fetchFromGitHub, automake, autoconf, autoreconfHook }: | |
let | |
inherit (python2Packages) pyGtkGlade pygtksourceview python; | |
in stdenv.mkDerivation rec { | |
version = "master"; | |
name = "linuxband-${version}"; | |
src = fetchFromGitHub { | |
owner = "noseka1"; |
-- -*- eval: (med/hp '(pretty-show generics-mrsop singletons)) -*- | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE PolyKinds #-} |
self: super: { | |
haskell.packages.ghc802 = super.haskell.packages.ghc802.extend (selfHS: superHS: { | |
concat-inline = self.haskell.lib.dontHaddock (selfHS.callPackage ~/code/haskell/forks/concat/inline {}); | |
concat-satisfy = self.haskell.lib.dontHaddock (selfHS.callPackage ~/code/haskell/forks/concat/satisfy {}); | |
}); | |
} |
{-# LANGUAGE ViewPatterns #-} | |
import Control.Monad | |
import Control.Monad.Trans.State.Strict | |
import Data.Sequence | |
import Pipes | |
import Pipes.Lift | |
import qualified Pipes.Prelude as P | |
import Prelude hiding (length) |
#include<iostream> | |
using namespace std; | |
void raddoppiaByReference(int &m) | |
{ | |
m=2*m; | |
} | |
int raddoppiaByValue(int m) | |
{ |
#include<iostream> | |
#include<cmath> | |
using namespace std; | |
// Codice che definisce la struct che rappresenta un numero complesso. Ricordati | |
// che si entra nei campi con la sintassi Variabile.Campo, quindi per esempio | |
// una volta definito un complesso z puoi prendere la parte reale con z.re | |
struct Complesso |
#include<iostream> | |
#include<cmath> | |
using namespace std; | |
// Codice che definisce nel main un array, prende gli elementi di input, e | |
// chiama una funzione media esterna. Nota che media prende un puntatore ad | |
// intero (che e' il primo elemento dell'array), e la lunghezza. | |
double media(int * m, int l) |